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