From c493f8ab8f56cb251cf19f8b2f9c421826e10a42 Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Sat, 23 Dec 2017 22:11:18 +0100 Subject: [PATCH] improve documentation --- README.md | 43 +++++++++++++++++++++++++++++++++++++++---- dotdrop.sh | 2 +- dotdrop/dotdrop.py | 3 +++ 3 files changed, 43 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f22877f..2919ff0 100644 --- a/README.md +++ b/README.md @@ -362,6 +362,9 @@ be executed. If used as a submodule, update it with ```bash $ git submodule foreach git pull origin master +$ git add dotdrop +$ git commit -m 'update dotdrop' +$ git push ``` Through pypi: @@ -579,6 +582,11 @@ $ cd ## get latest version of the submodule $ git submodule foreach git pull origin master +## and update it upstream +$ git add dotdrop +$ git commit -m 'update dotdrop' +$ git push + ## update the bash script wrapper $ ./dotdrop/bootstrap.sh ``` @@ -587,13 +595,40 @@ Otherwise, simply install it from pypi as explained [above](#with-pypi) and get rid of the submodule: * move to the dotfiles directory where dotdrop is used as a submodule +```bash +$ cd +``` * remove the entire `submodule "dotdrop"` section in `.gitmodules` -* stage the change with `git add .gitmodules` +* stage the changes +```bash +$ git add .gitmodules +``` * remove the entire `submodule "dotdrop"` section in `.git/config` -* remove the submodule with `git rm --cached dotdrop` -* remove the submodule from .git with `rm -rf .git/modules/dotdrop` +* remove the submodule +```bash +$ git rm --cached dotdrop +``` +* remove the submodule from .git +```bash +$ rm -rf .git/modules/dotdrop +``` * commit the changes -* delete any remaining files from the dotdrop submodule with `rm -rf dotdrop` +```bash +$ git commit -m 'removing dotdrop submodule' +``` +* remove any remaining files from the dotdrop submodule +```bash +$ rm -rf dotdrop +``` +* remove `dotdrop.sh` +```bash +$ git rm dotdrop.sh +$ git commit -m 'remove dotdrop.sh script' +``` +* push upstream +```bash +$ git push +``` # Contribution diff --git a/dotdrop.sh b/dotdrop.sh index f83cdd2..19bc6e5 100755 --- a/dotdrop.sh +++ b/dotdrop.sh @@ -24,7 +24,7 @@ sub="dotdrop" # pivot cd "${cur}" || { echo "Folder \"${cur}\" doesn't exist, aborting." && exit; } # init/update the submodule -git submodule foreach git pull origin master +git submodule update --init --recursive # launch dotdrop PYTHONPATH=dotdrop python3 -m dotdrop.dotdrop --cfg="${cfg}" "${args[@]}" # pivot back diff --git a/dotdrop/dotdrop.py b/dotdrop/dotdrop.py index 9a8c8b5..daaa2d2 100644 --- a/dotdrop/dotdrop.py +++ b/dotdrop/dotdrop.py @@ -21,6 +21,9 @@ If you want to keep it as a submodule (recommended), simply do the following: First get the latest version of dotdrop: $ git submodule foreach git pull origin master + $ git add dotdrop + $ git commit -m 'update dotdrop' + $ git push And then re-run the bootstrap script to update \"dotdrop.sh\": $ ./dotdrop/bootstrap.sh