Просмотр исходного кода

README: improve docs

Signed-off-by: Tianling Shen <[email protected]>
Tianling Shen 4 лет назад
Родитель
Сommit
a2011cd90f
1 измененных файлов с 53 добавлено и 15 удалено
  1. 53 15
      README.md

+ 53 - 15
README.md

@@ -1,36 +1,74 @@
 ## Setup instruction
 ## 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
-  git submodule add --name helloworld https://github.com/fw876/helloworld.git package/helloworld
-  ```
+	```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
+	```
 
 
-- Pull upstream commits:
+- Remove
 
 
   ```bash
   ```bash
-  git submodule update --remote package/helloworld
+  rm -rf package/helloworld
   ```
   ```
 
 
-### Method 2 - Add this repo as an OpenWrt feed
+### 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
+	```
 
 
-- Add new feed:
+- Remove
 
 
   ```bash
   ```bash
-  sed -i "/helloworld/d" "feeds.conf.default"
-  echo "src-git helloworld https://github.com/fw876/helloworld.git" >> "feeds.conf.default"
+  git submodule --deinit package/helloworld
+  rm -rf package/helloworld
   ```
   ```
 
 
-- Pull upstream commits:
+### Method 3 - Add this repo as an OpenWrt 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
   ```bash
-  ./scripts/feeds update helloworld
-  ./scripts/feeds install -a -f -p helloworld
+  sed -i "/helloworld/d" "feeds.conf.default"
+  ./scripts/feeds clean
+  ./scripts/feeds update -a
+  ./scripts/feeds install -a
   ```
   ```
 
 
-### Notice
+### Note
 
 
 If you want to use this repo with official OpenWrt source tree, the following packages need to be added manually:
 If you want to use this repo with official OpenWrt source tree, the following packages need to be added manually: