Added version command and constant variables

This commit is contained in:
JeremyStarTM 2022-08-14 13:48:45 +02:00
parent 5d20c6b246
commit 953eea11b6

View file

@ -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 <repository>"
echo " selfupdate"
echo " upstream <repository> <branch>"
echo " version"
exit 0
elif [ "$1" == "helpextend" ]; then
echo "<required> [optional]"
@ -427,6 +432,7 @@ elif [ "$1" == "helpextend" ]; then
echo "remrepo | <repository> | remove a cloned repository"
echo "selfupdate | | update sos-git"
echo "upstream | <repository> <branch> | 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