use git mv rather than add/rm

This commit is contained in:
Trevor Batley 2023-06-01 10:05:15 +10:00
parent 4c5d0ded39
commit ab4fe843e4

View File

@ -244,7 +244,7 @@ git add Makefile
# spec file # spec file
#Rename e-smith-<pkg>.spec as smeserver-<pkg>.spec #Rename e-smith-<pkg>.spec as smeserver-<pkg>.spec
mv "$SOURCEPKG.spec" "$TARGETPKG.spec" git mv "$SOURCEPKG.spec" "$TARGETPKG.spec"
#Update smeserver-<pkg>.spec #Update smeserver-<pkg>.spec
# - change name to smeserver-<pkg> (%define name) # - change name to smeserver-<pkg> (%define name)
@ -265,14 +265,13 @@ sed -i 's/ME MYSELF <myemail@koozali.org>/rename-e-smith-pkg.sh by Trevor Batley
sed -i "/%description/i Provides: $SOURCEPKG" "$TARGETPKG.spec" sed -i "/%description/i Provides: $SOURCEPKG" "$TARGETPKG.spec"
# - change Source: to new standard of tar.gz # - change Source: to new standard of tar.gz
sed -i "s/tar.xz/tar.gz/" "$TARGETPKG.spec" sed -i "/^Source:/ s/tar.xz/tar.gz/" "$TARGETPKG.spec"
# tell git about the changes # tell git about the changes
git rm "$SOURCEPKG.spec" $QUIET
git add "$TARGETPKG.spec" git add "$TARGETPKG.spec"
#Delete archivefilename file if it follows the new standard #Delete archivefilename file if it follows the new standard
if [ -e archivefilename ] ; then git rm archivefilename $QUIET ; fi if [ -e archivefilename ] ; then git rm archivefilename ; fi
#Update createlinks #Update createlinks
# - if there is an e-smith-<pkg>-update event rename to smeserver-<pkg>-update and add symlink # - if there is an e-smith-<pkg>-update event rename to smeserver-<pkg>-update and add symlink