From c15cd193c2c53cf2567d989db8883d9330a06e7c Mon Sep 17 00:00:00 2001 From: Peter Nerlich <peter.nerlich+dev@googlemail.com> Date: Wed, 5 May 2021 22:45:51 +0200 Subject: [PATCH] update.sh: allow target to be specified --- update.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/update.sh b/update.sh index b32d770..6382ca3 100755 --- a/update.sh +++ b/update.sh @@ -1,9 +1,13 @@ #!/bin/sh +target="${1:-master}" + +echo "reset target is $target" + # update meta repo -git fetch origin master +git fetch origin "$target" # use the latest commit on master, discard any local changes -git reset --hard origin/master +git reset --hard "$target" # sync repo urls git submodule sync --recursive # update commits, discard any local changes -- GitLab