From adb18caa13e40479fc35568b37e6c99c3c8564dc Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Sun, 18 Nov 2018 18:31:30 +0000 Subject: [PATCH] make, scripts: git submodule update --init --recursive Consistently run git submodule update with --init --recursive. Signed-off-by: Jan Lindemann --- make/rules.mk | 2 +- scripts/pgit.sh | 6 ++---- scripts/pkg.sh | 1 + 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/make/rules.mk b/make/rules.mk index 74a69713..2c13fad0 100644 --- a/make/rules.mk +++ b/make/rules.mk @@ -132,7 +132,7 @@ love: @echo "Not war?" cvsupdate update: - if [ -d "CVS" ]; then cvs update -dP || exit 1; else git pull || exit 1; fi + if [ -d "CVS" ]; then cvs update -dP || exit 1; else git pull && git submodule update --init --recursive || exit 1; fi cvsdiff diff: if [ -d "CVS" ]; then cvs diff -u || exit 1; else git --no-pager diff --relative --no-prefix . || exit 1; fi diff --git a/scripts/pgit.sh b/scripts/pgit.sh index 56fb550c..85cbb16b 100644 --- a/scripts/pgit.sh +++ b/scripts/pgit.sh @@ -130,8 +130,7 @@ clone() else run_git clone ssh://$login@git.janware.com/srv/git/$fromuser/proj/$p fi - run_git -C $p submodule init || fatal git submodule init failed in $p - run_git -C $p submodule update || fatal git submodule update failed in $p + run_git -C $p submodule update --init --recursive || fatal git submodule update failed in $p else local remotename="user-$fromuser" if [ -d $p ]; then @@ -151,8 +150,7 @@ clone() run_git -C $p branch --set-upstream-to origin/master master # set +x fi - run_git -C $p submodule init || fatal git submodule init failed in $p - run_git -C $p submodule update || fatal git submodule update failed in $p + run_git -C $p submodule update --init --recursive || fatal git submodule update failed in $p fi done )} diff --git a/scripts/pkg.sh b/scripts/pkg.sh index 61fd3abb..277349e6 100644 --- a/scripts/pkg.sh +++ b/scripts/pkg.sh @@ -109,6 +109,7 @@ check_scm() if [ -d .git ]; then log + checking git git pull --no-edit || fatal "git pull failed, giving up" + git submodule update --init --recursive || fatal "git submodule update failed, giving up" git status --porcelain | grep -v '^??' | grep -q . && { git status fatal "git has locally modified files, giving up"