1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 14:31:46 +00:00

fix the way submodule is updated

This commit is contained in:
deadc0de6
2017-12-23 21:54:29 +01:00
parent 0cbea609de
commit 1bd5137ca7
3 changed files with 15 additions and 6 deletions

View File

@@ -576,9 +576,11 @@ If you want to keep it as a submodule, simply do the following
```bash
$ cd <dotfiles-directory>
## get latest version
$ git submodule update --init --recursive
$ git submodule update --remote dotdrop
## get latest version of the submodule
$ cd dotdrop/
$ git checkout master
$ git pull
$ cd ../
## update the bash script wrapper
$ ./dotdrop/bootstrap.sh

View File

@@ -19,11 +19,17 @@ args=("$@")
cur=$(dirname "$(${rl} "${0}")")
opwd=$(pwd)
cfg="${cur}/config.yaml"
sub="dotdrop"
# pivot
cd "${cur}" || { echo "Folder \"${cur}\" doesn't exist, aborting." && exit; }
# init/update the submodule
git submodule update --init --recursive
if [ -e ${sub} ]; then
cd dotdrop
git checkout master
git pull
cd ..
fi
# launch dotdrop
PYTHONPATH=dotdrop python3 -m dotdrop.dotdrop --cfg="${cfg}" "${args[@]}"
# pivot back

View File

@@ -20,8 +20,9 @@ the way it needs to be called has slightly changed.
If you want to keep it as a submodule (recommended), simply do the following:
First get the latest version of dotdrop:
$ git submodule update --init --recursive
$ git submodule update --remote dotdrop
$ cd dotdrop
$ git checkout master
$ git pull
And then re-run the bootstrap script to update \"dotdrop.sh\":
$ ./dotdrop/bootstrap.sh