From 1bd5137ca771f6546e7c3ab12e875f1ff548ca67 Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Sat, 23 Dec 2017 21:54:29 +0100 Subject: [PATCH] fix the way submodule is updated --- README.md | 8 +++++--- dotdrop.sh | 8 +++++++- dotdrop/dotdrop.py | 5 +++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 21dce2a..6c05fa7 100644 --- a/README.md +++ b/README.md @@ -576,9 +576,11 @@ If you want to keep it as a submodule, simply do the following ```bash $ cd -## 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 diff --git a/dotdrop.sh b/dotdrop.sh index bf056d0..cccdcd1 100755 --- a/dotdrop.sh +++ b/dotdrop.sh @@ -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 diff --git a/dotdrop/dotdrop.py b/dotdrop/dotdrop.py index c510223..024c270 100644 --- a/dotdrop/dotdrop.py +++ b/dotdrop/dotdrop.py @@ -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