From 8f8632e65e30e72571ef981f89f14de28c4c83ac Mon Sep 17 00:00:00 2001 From: Trevor Batley Date: Wed, 14 Jun 2023 16:48:14 +1000 Subject: [PATCH] fix archivefilename --- rename-e-smith-pkg.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rename-e-smith-pkg.sh b/rename-e-smith-pkg.sh index d855026..6bc7882 100755 --- a/rename-e-smith-pkg.sh +++ b/rename-e-smith-pkg.sh @@ -280,11 +280,15 @@ sed -i "/^Source:/ s/tar.xz/tar.gz/" "$TARGETPKG.spec" git add "$TARGETPKG.spec" #Delete archivefilename file if it follows the new standard -if [ -e archivefilename ] ; then - if [ $(cat archivefilename) == "$TARGETPKG-*.tar.gz" ] ; then +if [[ -e archivefilename ]] ; then + if [ $DEBUG ] ; then echo "archivefilename exists" ; fi + if [[ $(cat archivefilename) == "$TARGETPKG-*.tar.gz" ]] ; then + if [ $DEBUG ] ; then echo "deleteing archivefilename - meets new standard" ; fi git rm archivefilename $QUIET else + if [ $DEBUG ] ; then echo "substituting smeserver for e-smith in archivefilename" ; fi sed -i 's/e-smith/smeserver/g' archivefilename + git add archivefilename fi fi #Update createlinks