README: improve docs

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen committed 2021-10-23 10:08:09 +08:00
1 parent a49e533c17
commit a2011cd90f
1 file changed
+54 -16
+54 -16
View File
@@ -1,36 +1,74 @@
## Setup instruction
### Method 1 - Add this repo as a git submodule
### Method 1 - Clone this repo directly
- Add new submodule:
1. Clone this repo:
```bash
rm -rf package/helloworld
git clone --depth=1 https://github.com/fw876/helloworld.git package/helloworld
```
2. Pull upstream commits:
```bash
git -C package/helloworld pull
```
- Remove
```bash
git submodule add --name helloworld https://github.com/fw876/helloworld.git package/helloworld
rm -rf package/helloworld
```
- Pull upstream commits:
### Method 2 - Add this repo as a git submodule
1. Add new submodule:
```bash
rm -rf package/helloworld
git submodule add --name helloworld https://github.com/fw876/helloworld.git package/helloworld
```
2. Pull upstream commits:
```bash
git submodule update --remote package/helloworld
```
- Remove
```bash
git submodule update --remote package/helloworld
git submodule --deinit package/helloworld
rm -rf package/helloworld
```
### Method 2 - Add this repo as an OpenWrt feed
### Method 3 - Add this repo as an OpenWrt feed
- Add new feed:
1. Add new feed:
```bash
sed -i "/helloworld/d" "feeds.conf.default"
echo "src-git helloworld https://github.com/fw876/helloworld.git" >> "feeds.conf.default"
```
2. Pull upstream commits:
```bash
./scripts/feeds update helloworld
./scripts/feeds install -a -f -p helloworld
```
- Remove
```bash
sed -i "/helloworld/d" "feeds.conf.default"
echo "src-git helloworld https://github.com/fw876/helloworld.git" >> "feeds.conf.default"
./scripts/feeds clean
./scripts/feeds update -a
./scripts/feeds install -a
```
- Pull upstream commits:
```bash
./scripts/feeds update helloworld
./scripts/feeds install -a -f -p helloworld
```
### Notice
### Note
If you want to use this repo with official OpenWrt source tree, the following packages need to be added manually: