quieten a little
This commit is contained in:
parent
dc0ed1b79d
commit
7eb6b5769e
@ -38,16 +38,20 @@ DEBUG=
|
||||
if [ ${smegit_DEBUG} == "true" ] ; then DEBUG=true ; fi
|
||||
if [ $DEBUG ] ; then echo "found ini file: $inifilename" ; fi
|
||||
|
||||
curlsilent="-s"
|
||||
if [ $DEBUG ] ; then curlsilent= ; fi
|
||||
SILENT="-s"
|
||||
QUIET="-q"
|
||||
if [ $DEBUG ] ; then
|
||||
SILENT=
|
||||
QUIET=
|
||||
fi
|
||||
|
||||
GITEAHOST=${remote_GITEAHOST}
|
||||
ACCESSTOKEN=${remote_GITEAACCESSTOKEN}
|
||||
if [ $3 ] ; then
|
||||
if [ $3 == "local" ] ; then
|
||||
GITEAHOST=${local_GITEAHOST}
|
||||
ACCESSTOKEN=${local_GITEAACCESSTOKEN}
|
||||
fi
|
||||
if [ $3 == "local" ] ; then
|
||||
GITEAHOST=${local_GITEAHOST}
|
||||
ACCESSTOKEN=${local_GITEAACCESSTOKEN}
|
||||
fi
|
||||
fi
|
||||
ORG_NAME="$2"
|
||||
REPO_NAME="$1"
|
||||
@ -76,7 +80,7 @@ if [ $DEBUG ] ; then echo $GITFiles ; fi
|
||||
if [ ! -e $GITFiles/common ]; then
|
||||
#Get it
|
||||
cd $GITFiles
|
||||
git clone "${smegit_COMMONREPO}"
|
||||
git clone $QUIET "${smegit_COMMONREPO}"
|
||||
if [ ! -e $GITFiles/common ]; then
|
||||
echo "ERROR*******No Common Repo found - package $REPO_NAME"
|
||||
exit 1
|
||||
@ -84,14 +88,14 @@ if [ ! -e $GITFiles/common ]; then
|
||||
else
|
||||
# Just refresh it
|
||||
cd $GITFiles/common
|
||||
git pull
|
||||
git $QUIET pull
|
||||
fi
|
||||
|
||||
# Now make sure that the make-archive is executible
|
||||
chmod +x $GITFiles/common/make-archive.sh
|
||||
|
||||
# See if repo exits in git
|
||||
RESPONSE=$(curl $curlsilent -o /dev/null -w "%{http_code}" "$GITEAHOST/api/v1/repos/$ORG_NAME/$REPO_NAME")
|
||||
RESPONSE=$(curl $SILENT -o /dev/null -w "%{http_code}" "$GITEAHOST/api/v1/repos/$ORG_NAME/$REPO_NAME")
|
||||
if [ "$RESPONSE" == "200" ]; then
|
||||
if [ $DEBUG ] ; then echo "Repository for $ORG_NAME/$REPO_NAME exists!" ; fi
|
||||
else
|
||||
@ -106,7 +110,7 @@ else
|
||||
esac
|
||||
done
|
||||
# And check it is now there
|
||||
RESPONSE=$(curl $curlsilent -o /dev/null -w "%{http_code}" "$GITEAHOST/api/v1/repos/$ORG_NAME/$REPO_NAME")
|
||||
RESPONSE=$(curl $SILENT -o /dev/null -w "%{http_code}" "$GITEAHOST/api/v1/repos/$ORG_NAME/$REPO_NAME")
|
||||
if [ "$RESPONSE" == "200" ]; then
|
||||
if [ $DEBUG ] ; then echo "Repository for $ORG_NAME/$REPO_NAME created sucessfully!" ; fi
|
||||
else
|
||||
@ -125,7 +129,7 @@ if [[ -d $REPO_NAME ]] ; then
|
||||
rm -rf "$REPO_NAME"
|
||||
fi
|
||||
cd $GITFiles
|
||||
git clone "$REPOURL"
|
||||
git $QUIET clone "$REPOURL"
|
||||
|
||||
|
||||
cd $GITFiles
|
||||
@ -144,12 +148,3 @@ else
|
||||
echo "$(date +'%FT%H%M') Mockbuild failed for $ORG_NAME/$REPO_NAME " >> $GITFiles/mockbuilds.log
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user