From 953eea11b6de0ace9cae110ec2b33fc930175baa Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 14 Aug 2022 13:48:45 +0200 Subject: [PATCH] Added version command and constant variables --- sos-git.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sos-git.sh b/sos-git.sh index 8efb0c8..fdfcdad 100755 --- a/sos-git.sh +++ b/sos-git.sh @@ -1,4 +1,7 @@ #!/bin/bash +function setConstant() { + export "SOSGIT_VERSION=13" +} function getDefaultConfiguration() { # SOSGIT_CONFIGVERSION=5 # # sos-git configuration\n @@ -282,6 +285,7 @@ loadUserConfiguration doSystemSetup doUserSetup doRepositorySetup +setConstant function translateRepo() { export "SOSGIT_EXITSTRING=${SOSGIT_REPOS}/$1" } @@ -406,6 +410,7 @@ elif [ "$1" == "help" ]; then echo " remrepo " echo " selfupdate" echo " upstream " + echo " version" exit 0 elif [ "$1" == "helpextend" ]; then echo " [optional]" @@ -427,6 +432,7 @@ elif [ "$1" == "helpextend" ]; then echo "remrepo | | remove a cloned repository" echo "selfupdate | | update sos-git" echo "upstream | | push new changes and set branch upstream" + echo "version | | returns version string" elif [ "$1" == "build" ]; then if [ "$2" == "" ]; then argumentMissing @@ -635,6 +641,9 @@ elif [ "$1" == "history" ]; then else noRepoFound "$2" fi +elif [ "$1" == "version" ]; then + echo "sos-git $SOSGIT_VERSION" + echo "config $SOSGIT_CONFIGVERSION" else argumentMissing fi