diff --git a/README.md b/README.md index 02b80551..a6b93f0b 100644 --- a/README.md +++ b/README.md @@ -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: