From ab4fe843e41a1ecaf111565eef5a19d8a3532a60 Mon Sep 17 00:00:00 2001 From: Trevor Batley Date: Thu, 1 Jun 2023 10:05:15 +1000 Subject: [PATCH] use git mv rather than add/rm --- rename-e-smith-pkg.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/rename-e-smith-pkg.sh b/rename-e-smith-pkg.sh index 1a2abae..5f11285 100755 --- a/rename-e-smith-pkg.sh +++ b/rename-e-smith-pkg.sh @@ -244,7 +244,7 @@ git add Makefile # spec file #Rename e-smith-.spec as smeserver-.spec -mv "$SOURCEPKG.spec" "$TARGETPKG.spec" +git mv "$SOURCEPKG.spec" "$TARGETPKG.spec" #Update smeserver-.spec # - change name to smeserver- (%define name) @@ -265,14 +265,13 @@ sed -i 's/ME MYSELF /rename-e-smith-pkg.sh by Trevor Batley sed -i "/%description/i Provides: $SOURCEPKG" "$TARGETPKG.spec" # - 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 -git rm "$SOURCEPKG.spec" $QUIET git add "$TARGETPKG.spec" #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 # - if there is an e-smith--update event rename to smeserver--update and add symlink