fixes a bug, where update-script could not be called from any directory
This commit is contained in:
parent
d1c607f2bf
commit
77845e4732
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue