From c27904661ef96cb2e7c729ce82b527146529c768 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Sun, 26 Apr 2009 20:58:04 +1000 Subject: makepkg: make in-place sed portable Do a sed replacement in-place is not very portable. On Mac OSX and BSDs, the syntax is "sed -i ''" where as with GNU sed the command is "sed -i''" or just "sed -i". This patch detects which command should be used during configure. Credit to Kevin Barry who researched this issue and provided a patch to work around this using temporary backup files. Signed-off-by: Allan McRae Signed-off-by: Dan McGee --- scripts/makepkg.sh.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/makepkg.sh.in') diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 97acfb49..b8e09f50 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1172,8 +1172,8 @@ devel_update() { if [ -n "$newpkgver" ]; then if [ "$newpkgver" != "$pkgver" ]; then if [ -f "./$BUILDSCRIPT" ]; then - sed -i "s/^pkgver=[^ ]*/pkgver=$newpkgver/" "./$BUILDSCRIPT" - sed -i "s/^pkgrel=[^ ]*/pkgrel=1/" "./$BUILDSCRIPT" + @SEDINPLACE@ "s/^pkgver=[^ ]*/pkgver=$newpkgver/" "./$BUILDSCRIPT" + @SEDINPLACE@ "s/^pkgrel=[^ ]*/pkgrel=1/" "./$BUILDSCRIPT" source "$BUILDSCRIPT" fi fi -- cgit v1.2.3-24-g4f1b