only: better logging

This commit is contained in:
rusefillc 2024-06-09 11:27:18 -04:00
parent 1569a8bede
commit 6fe377f2d4
1 changed files with 4 additions and 2 deletions

View File

@ -3,12 +3,14 @@
SUBMODULE=$1 SUBMODULE=$1
BRANCH=$2 BRANCH=$2
SCRIPT_NAME=$(basename "$0")
if [[ -z "$SUBMODULE" || -z "$BRANCH" ]]; then if [[ -z "$SUBMODULE" || -z "$BRANCH" ]]; then
echo "Two arguments expected: submodule path and branch" echo "${SCRIPT_NAME}: Two arguments expected: submodule path and branch"
exit -1 exit -1
fi fi
echo "Switching SUBMODULE=[$SUBMODULE] to BRANCH=[$BRANCH]" echo "${SCRIPT_NAME}: Switching SUBMODULE=[$SUBMODULE] to BRANCH=[$BRANCH]"
git submodule set-branch -b $BRANCH $SUBMODULE git submodule set-branch -b $BRANCH $SUBMODULE
git submodule sync git submodule sync