fix dodgy debug echo
This commit is contained in:
parent
8a0ab3a7c4
commit
1c4b06eae8
@ -154,7 +154,7 @@ cvs -d:ext:shell.koozali.org:/cvs/$2 $QUIET checkout $1
|
|||||||
# and init gitea organisation
|
# and init gitea organisation
|
||||||
# Adjust where we put the repo locally accordingly.
|
# Adjust where we put the repo locally accordingly.
|
||||||
ORGGITEA=$2
|
ORGGITEA=$2
|
||||||
if [ "$2" == "smecontribs" ]; then
|
if [[ "$2" == "smecontribs" ]]; then
|
||||||
BASEORCONTRIB="contribs10"
|
BASEORCONTRIB="contribs10"
|
||||||
PRODUCTBUGZILLA="SME%20Contribs"
|
PRODUCTBUGZILLA="SME%20Contribs"
|
||||||
else
|
else
|
||||||
@ -217,7 +217,7 @@ fi
|
|||||||
|
|
||||||
# See if it exists on the Gitea host
|
# See if it exists on the Gitea host
|
||||||
REPO_NAME=$1
|
REPO_NAME=$1
|
||||||
if [ $DEBUG ] ; then echo "curl $checkSSL $curlsilent -o /dev/null -w %{http_code} $GITEAHOST/api/v1/repos/$ORGGITEA/$REPO_NAME"
|
if [ $DEBUG ] ; then echo "check that $GITEAHOST/$ORGGITEA/$REPO_NAME exists"
|
||||||
RESPONSE=$(curl $checkSSL $curlsilent -o /dev/null -w "%{http_code}" "$GITEAHOST/api/v1/repos/$ORGGITEA/$REPO_NAME")
|
RESPONSE=$(curl $checkSSL $curlsilent -o /dev/null -w "%{http_code}" "$GITEAHOST/api/v1/repos/$ORGGITEA/$REPO_NAME")
|
||||||
if [ "$RESPONSE" == "200" ]; then
|
if [ "$RESPONSE" == "200" ]; then
|
||||||
if [ $DEBUG ] ; then echo "************Repository for $1 already exists!" ; fi
|
if [ $DEBUG ] ; then echo "************Repository for $1 already exists!" ; fi
|
||||||
@ -239,7 +239,7 @@ cd $GITFiles
|
|||||||
if [ -d "$1" ] ; then
|
if [ -d "$1" ] ; then
|
||||||
cd $GITFiles/$1
|
cd $GITFiles/$1
|
||||||
# Retain the contents of the README.md (incase its been editted, and saving multiple GPT accesses)
|
# Retain the contents of the README.md (incase its been editted, and saving multiple GPT accesses)
|
||||||
if [ -f README.md ]; then
|
if [ -f README.md ] ; then
|
||||||
# Move it and remember its new (temp) name
|
# Move it and remember its new (temp) name
|
||||||
READMECONTENTS=`mktemp`
|
READMECONTENTS=`mktemp`
|
||||||
mv -f README.md "$READMECONTENTS"
|
mv -f README.md "$READMECONTENTS"
|
||||||
@ -325,7 +325,7 @@ fi
|
|||||||
|
|
||||||
# And check it now exists
|
# And check it now exists
|
||||||
RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" "$GITEAHOST/api/v1/repos/$ORGGITEA/$1")
|
RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" "$GITEAHOST/api/v1/repos/$ORGGITEA/$1")
|
||||||
if [ "$RESPONSE" == "200" ]; then
|
if [[ "$RESPONSE" == "200" ]]; then
|
||||||
if [ $DEBUG ] ; then echo "************Repository for $1 exists" ; fi
|
if [ $DEBUG ] ; then echo "************Repository for $1 exists" ; fi
|
||||||
else
|
else
|
||||||
echo "ERROR*******Repository for $1 has not been created ($JSONREQ)"
|
echo "ERROR*******Repository for $1 has not been created ($JSONREQ)"
|
||||||
@ -368,7 +368,7 @@ if [ ! -f $ARCHIVEFILE ]; then
|
|||||||
# Try another tack
|
# Try another tack
|
||||||
if [ $DEBUG ] ; then echo "************File $ARCHIVE does not exist - trying *.$EXT" ; fi
|
if [ $DEBUG ] ; then echo "************File $ARCHIVE does not exist - trying *.$EXT" ; fi
|
||||||
ARCHIVEFILE=`ls *.$EXT | head -n 1`
|
ARCHIVEFILE=`ls *.$EXT | head -n 1`
|
||||||
if [ ! -f $ARCHIVEFILE || -z $ARCHIVEFILE ]; then
|
if [[ ! -f $ARCHIVEFILE || -z $ARCHIVEFILE ]]; then
|
||||||
echo "ERROR*******Can't identify archive file $ARCHIVEFILE $EXT `pwd`"
|
echo "ERROR*******Can't identify archive file $ARCHIVEFILE $EXT `pwd`"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -528,7 +528,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
cd $GITFiles/$1
|
cd $GITFiles/$1
|
||||||
if [ $ARCHIVEFILE != "$TREEPATH.tar.gz" ] ; then
|
if [[ $ARCHIVEFILE != "$TREEPATH.tar.gz" ]] ; then
|
||||||
echo "$ARCHIVEFILE" > archivefilename
|
echo "$ARCHIVEFILE" > archivefilename
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -630,7 +630,7 @@ if [[ "$NAME" =~ ^(smeserver-|e-smith-).* ]]; then
|
|||||||
if [[ ! "$URL" =~ 'fr' ]] ; then echo "${URL}"; break; fi \
|
if [[ ! "$URL" =~ 'fr' ]] ; then echo "${URL}"; break; fi \
|
||||||
done <<< "${RESULTS}" )
|
done <<< "${RESULTS}" )
|
||||||
|
|
||||||
if [ "$READMECONTENTS" == "" ]; then
|
if [[ "$READMECONTENTS" == "" ]]; then
|
||||||
# nothing previous
|
# nothing previous
|
||||||
# Copy across the Wiki links to the README
|
# Copy across the Wiki links to the README
|
||||||
if [ ! "$URLS" = "" ]; then
|
if [ ! "$URLS" = "" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user