From 62bfba53dbb33d12f3a4beaf9044a04b40c6b537 Mon Sep 17 00:00:00 2001 From: Alastair Hughes Date: Sat, 12 Aug 2017 09:15:33 +1200 Subject: Make the flags used for sed -i configurable Not all sed implementations on linux accept the --follow-symlinks argument, so let the user configure the arguments passed to sed if required. Signed-off-by: Alastair Hughes [Allan: fixed configure summary output] Signed-off-by: Allan McRae --- scripts/Makefile.am | 3 ++- scripts/makepkg.sh.in | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 4bb08a24..86e44cb6 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -152,7 +152,8 @@ edit = sed \ -e "s|@OWNERCMD[@]|$(OWNERCMD)|g" \ -e "s|@MODECMD[@]|$(MODECMD)|g" \ -e 's|@SIZECMD[@]|$(SIZECMD)|g' \ - -e 's|@SEDINPLACE[@]|$(SEDINPLACE)|g' \ + -e 's|@SEDINPLACEFLAGS[@]|$(SEDINPLACEFLAGS)|g' \ + -e 's|@SEDPATH[@]|$(SEDPATH)|g' \ -e 's|@DUFLAGS[@]|$(DUFLAGS)|g' \ -e 's|@DUPATH[@]|$(DUPATH)|g' \ -e 's|@SCRIPTNAME[@]|$@|g' \ diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index a466e4f1..54998fdb 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -195,12 +195,12 @@ update_pkgver() { if [[ -n $newpkgver && $newpkgver != "$pkgver" ]]; then if [[ -f $BUILDFILE && -w $BUILDFILE ]]; then - if ! @SEDINPLACE@ "s:^pkgver=[^ ]*:pkgver=$newpkgver:" "$BUILDFILE"; then + if ! @SEDPATH@ @SEDINPLACEFLAGS@ "s:^pkgver=[^ ]*:pkgver=$newpkgver:" "$BUILDFILE"; then error "$(gettext "Failed to update %s from %s to %s")" \ "pkgver" "$pkgver" "$newpkgver" exit 1 fi - @SEDINPLACE@ "s:^pkgrel=[^ ]*:pkgrel=1:" "$BUILDFILE" + @SEDPATH@ @SEDINPLACEFLAGS@ "s:^pkgrel=[^ ]*:pkgrel=1:" "$BUILDFILE" source_safe "$BUILDFILE" local fullver=$(get_full_version) msg "$(gettext "Updated version: %s")" "$pkgbase $fullver" -- cgit v1.2.3-24-g4f1b