From e68b051f8380dc8d564812a51ec5f897b0bbd1d2 Mon Sep 17 00:00:00 2001 From: Trevor Batley Date: Fri, 2 Jun 2023 11:12:56 +1000 Subject: [PATCH] option for nooutput --- rename-e-smith-pkg.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/rename-e-smith-pkg.sh b/rename-e-smith-pkg.sh index 5ab7528..b41a2dd 100755 --- a/rename-e-smith-pkg.sh +++ b/rename-e-smith-pkg.sh @@ -68,6 +68,7 @@ SOURCEACCESSTOKEN=${remote_GITEAACCESSTOKEN} SOURCEORG="smeserver" TARGETORG=${remote_USER} DELETEIT= +NOOUTPUT= for param in $2 $3 $4 $5; do if [ $param ] ; then case $param in @@ -79,6 +80,8 @@ for param in $2 $3 $4 $5; do DELETEIT=true ;; debug ) DEBUG=true ;; + nooutput ) + NOOUTPUT=true * ) SOURCEORGORG=$param ;; esac @@ -284,6 +287,8 @@ git push origin &> /dev/null #Convert repository to a Regular Repository (rather than fork) #Can't do via API call ATM, so leave a message -echo "$SOURCEORG/$SOURCEPKG has been renamed as $TARGETORG/$TARGETPKG" -echo "It is still a forked repository, so you need to 'Convert to Regular Repository' in GITEA and then 'Transfer' it to it's final Organisation" +if [[ -z $NOOUTPUT ]] ; then + echo "$SOURCEORG/$SOURCEPKG has been renamed as $TARGETORG/$TARGETPKG" + echo "It is still a forked repository, so you need to 'Convert to Regular Repository' in GITEA and then 'Transfer' it to it's final Organisation" +fi exit 0