Added version command and constant variables
This commit is contained in:
parent
5d20c6b246
commit
953eea11b6
1 changed files with 9 additions and 0 deletions
|
@ -1,4 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
function setConstant() {
|
||||||
|
export "SOSGIT_VERSION=13"
|
||||||
|
}
|
||||||
function getDefaultConfiguration() {
|
function getDefaultConfiguration() {
|
||||||
# SOSGIT_CONFIGVERSION=5
|
# SOSGIT_CONFIGVERSION=5
|
||||||
# # sos-git configuration\n
|
# # sos-git configuration\n
|
||||||
|
@ -282,6 +285,7 @@ loadUserConfiguration
|
||||||
doSystemSetup
|
doSystemSetup
|
||||||
doUserSetup
|
doUserSetup
|
||||||
doRepositorySetup
|
doRepositorySetup
|
||||||
|
setConstant
|
||||||
function translateRepo() {
|
function translateRepo() {
|
||||||
export "SOSGIT_EXITSTRING=${SOSGIT_REPOS}/$1"
|
export "SOSGIT_EXITSTRING=${SOSGIT_REPOS}/$1"
|
||||||
}
|
}
|
||||||
|
@ -406,6 +410,7 @@ elif [ "$1" == "help" ]; then
|
||||||
echo " remrepo <repository>"
|
echo " remrepo <repository>"
|
||||||
echo " selfupdate"
|
echo " selfupdate"
|
||||||
echo " upstream <repository> <branch>"
|
echo " upstream <repository> <branch>"
|
||||||
|
echo " version"
|
||||||
exit 0
|
exit 0
|
||||||
elif [ "$1" == "helpextend" ]; then
|
elif [ "$1" == "helpextend" ]; then
|
||||||
echo "<required> [optional]"
|
echo "<required> [optional]"
|
||||||
|
@ -427,6 +432,7 @@ elif [ "$1" == "helpextend" ]; then
|
||||||
echo "remrepo | <repository> | remove a cloned repository"
|
echo "remrepo | <repository> | remove a cloned repository"
|
||||||
echo "selfupdate | | update sos-git"
|
echo "selfupdate | | update sos-git"
|
||||||
echo "upstream | <repository> <branch> | push new changes and set branch upstream"
|
echo "upstream | <repository> <branch> | push new changes and set branch upstream"
|
||||||
|
echo "version | | returns version string"
|
||||||
elif [ "$1" == "build" ]; then
|
elif [ "$1" == "build" ]; then
|
||||||
if [ "$2" == "" ]; then
|
if [ "$2" == "" ]; then
|
||||||
argumentMissing
|
argumentMissing
|
||||||
|
@ -635,6 +641,9 @@ elif [ "$1" == "history" ]; then
|
||||||
else
|
else
|
||||||
noRepoFound "$2"
|
noRepoFound "$2"
|
||||||
fi
|
fi
|
||||||
|
elif [ "$1" == "version" ]; then
|
||||||
|
echo "sos-git $SOSGIT_VERSION"
|
||||||
|
echo "config $SOSGIT_CONFIGVERSION"
|
||||||
else
|
else
|
||||||
argumentMissing
|
argumentMissing
|
||||||
fi
|
fi
|
||||||
|
|
Reference in a new issue