fixes a bug, where update-script could not be called from any directory

This commit is contained in:
Lars Berning 2022-01-17 21:29:50 +01:00
parent d1c607f2bf
commit 77845e4732
No known key found for this signature in database
GPG Key ID: 028E73C9E1D8A0B3
1 changed files with 3 additions and 2 deletions

View File

@ -98,14 +98,15 @@ CURRENT_DIR=$(pwd)
SCRIPT_DIR="$( cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd )"
INSTALL_DIR="$(dirname "$SCRIPT_DIR")"
GIT_REMOTE="https://github.com/laberning/openrowingmonitor.git"
cd $INSTALL_DIR
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
LOCAL_VERSION=$(git rev-parse HEAD)
print "Update script for Open Rowing Monitor"
print
cd $INSTALL_DIR
if getopts "b:" arg; then
if [ $CURRENT_BRANCH = $OPTARG ]; then
cancel "No need to switch to branch \"$OPTARG\", it is already the active branch"