diff --git a/git-get-repo-and-build.sh b/git-get-repo-and-build.sh index b69727d..62d95dc 100755 --- a/git-get-repo-and-build.sh +++ b/git-get-repo-and-build.sh @@ -8,7 +8,7 @@ if [ ! -e $inifilename ] ; then # Not here, look at system default if [ ! -e /etc/smegit.ini ] ; then echo "No ini file found $inifiename or /etc/smegit.ini" - echo "get-repo-and-build.sh []" + echo "get-repo-and-build.sh [ ]" exit 1 else initfilename="/etc/smegit.ini" @@ -35,7 +35,27 @@ if [[ -z $1 && -z $2 ]] ; then fi DEBUG= +GITEAHOST=${remote_GITEAHOST} +ACCESSTOKEN=${remote_GITEAACCESSTOKEN} +ORG_NAME="$2" +REPO_NAME="$1" if [ ${smegit_DEBUG} == "true" ] ; then DEBUG=true ; fi +for param in $3 $4 $5 $6; do + if [ $param ] ; then + case $param in + local ) + GITEAHOST=${local_GITEAHOST} + ACCESSTOKEN=${local_GITEAACCESSTOKEN} + ;; + debug ) + DEBUG=true ;; + * ) + TARGETORG=$param ;; + esac + else + break + fi +done if [ $DEBUG ] ; then echo "found ini file: $inifilename" ; fi SILENT="-s" @@ -47,12 +67,6 @@ fi GITEAHOST=${remote_GITEAHOST} ACCESSTOKEN=${remote_GITEAACCESSTOKEN} -if [ $3 ] ; then - if [ $3 == "local" ] ; then - GITEAHOST=${local_GITEAHOST} - ACCESSTOKEN=${local_GITEAACCESSTOKEN} - fi -fi ORG_NAME="$2" REPO_NAME="$1" if [[ $smegit_WORKDIR == ~* ]] ; then