summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Sokolovsky <paul.sokolovsky@linaro.org>2015-02-24 14:43:10 +0200
committerPaul Sokolovsky <paul.sokolovsky@linaro.org>2015-02-24 14:43:10 +0200
commitefb1ba770d8293b077461934647015d3f2f9dd1e (patch)
treef988f8865057847b1a60962778e737a4207ba3af
parent31871d2be1b2180896a44452019943757996a3d6 (diff)
downloadlinaro-jenkins-tools-efb1ba770d8293b077461934647015d3f2f9dd1e.tar.gz
Add "commit-users" command.
Change-Id: I7fd686ed600e4ad74d5e568caa28f4ec802df4f9
-rwxr-xr-xgit-backup/backup.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/git-backup/backup.sh b/git-backup/backup.sh
index a3910a6..a30abe9 100755
--- a/git-backup/backup.sh
+++ b/git-backup/backup.sh
@@ -49,6 +49,17 @@ elif [ "$cmd" = "commit" ]; then
exit 1
fi
echo "Jobs are now commited, but not pushed. Run $0 $1 $2 push"
+elif [ "$cmd" = "commit-users" ]; then
+ msg="Routine users update"
+ $SSH $HOST "cd /var/lib/jenkins; git commit -m \"$msg\" users"
+ msg="Capture new users"
+ $SSH $HOST "cd /var/lib/jenkins; git add users; git commit -m \"$msg\" users"
+ st=$?
+ if [ $st -ne 0 ]; then
+ echo "*** ERROR ***"
+ exit 1
+ fi
+ echo "Users are now commited, but not pushed. Run $0 $1 $2 push"
elif [ "$cmd" = "push" ]; then
gituser="$1"
if [ "$4" != "" ]; then