From 6fe377f2d40f52a532a55a5a5e75bbad1170b936 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Sun, 9 Jun 2024 11:27:18 -0400 Subject: [PATCH] only: better logging --- misc/git_scripts/git_switch_submodule_branch.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/misc/git_scripts/git_switch_submodule_branch.sh b/misc/git_scripts/git_switch_submodule_branch.sh index 38b79fb2cd..f5c6e3cfb6 100644 --- a/misc/git_scripts/git_switch_submodule_branch.sh +++ b/misc/git_scripts/git_switch_submodule_branch.sh @@ -3,12 +3,14 @@ SUBMODULE=$1 BRANCH=$2 +SCRIPT_NAME=$(basename "$0") + 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 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 sync