From 0f2744e3776b42527dc659931558be221ab124c0 Mon Sep 17 00:00:00 2001 From: Thomas Stokes Date: Thu, 14 Mar 2024 16:43:38 +0100 Subject: [PATCH] b1873: Fix the 0 argument help msg. --- .../repo/usr/local/bin/sync-repo-and-execute-cmd.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/configuration/environments_scripts/repo/usr/local/bin/sync-repo-and-execute-cmd.sh b/configuration/environments_scripts/repo/usr/local/bin/sync-repo-and-execute-cmd.sh index fbe9e9cd7a7..78f0552ff08 100755 --- a/configuration/environments_scripts/repo/usr/local/bin/sync-repo-and-execute-cmd.sh +++ b/configuration/environments_scripts/repo/usr/local/bin/sync-repo-and-execute-cmd.sh @@ -4,11 +4,12 @@ # that given branch; and - if new commits are found - merges them into the branch and runs a command. if [ $# -eq 0 ]; then - echo "$0 PATH_TO_GIT_REPO COMMAND_TO_RUN_ON_COMPLETION_IN_REPO" + echo "$0 PATH_TO_GIT_REPO COMMAND_TO_RUN_ON_COMPLETION_IN_REPO BRANCH_TO_CHECK_OUT" echo "" echo "EXAMPLE: sync-repo-and-execute-cmd.sh \"/etc/httpd\" \"sudo service httpd reload\"" - echo "This script is used to automatically fetch from a git repo and, if there are new commits, merge the changes." - echo "And then run a command, passed as an argument." + echo "This script is used to automatically fetch the latest changes to a given branch of a git repo and," + echo "if there are new commits, merge the changes into that branch." + echo "And then run a command, passed as an argument. This leaves the repo checked out to the branch in the argument." exit 2 fi @@ -54,5 +55,4 @@ then else echo "Config error" fi -fi - +fi \ No newline at end of file