mirror of
https://github.com/bstansell/conserver.git
synced 2024-12-23 14:42:26 +00:00
Merge pull request #36 from conserver/fix-sed-inplace-warning
Fix #35 - check for sed inplace style
This commit is contained in:
commit
933f3271ad
@ -2,6 +2,11 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
case $(sed --help 2>&1) in
|
||||||
|
*GNU*) sed_i () { sed -i "$@"; };;
|
||||||
|
*) sed_i () { sed -i '' "$@"; };;
|
||||||
|
esac
|
||||||
|
|
||||||
local=false && [ "$1" = "local" ] && local=true
|
local=false && [ "$1" = "local" ] && local=true
|
||||||
|
|
||||||
[ -f conserver/version.h ] || { echo "you are in the wrong place" ; exit 1; }
|
[ -f conserver/version.h ] || { echo "you are in the wrong place" ; exit 1; }
|
||||||
@ -27,8 +32,8 @@ if [ ! -f ../conserver-$ver.tar.gz ] || $local; then
|
|||||||
cd build/conserver-$ver
|
cd build/conserver-$ver
|
||||||
../../package/setup-configure
|
../../package/setup-configure
|
||||||
rm -rf package
|
rm -rf package
|
||||||
sed -i "" -e "/^%define ver/s| ver.*| ver $ver|" contrib/redhat-rpm/conserver.spec
|
sed_i -e "/^%define ver/s| ver.*| ver $ver|" contrib/redhat-rpm/conserver.spec
|
||||||
sed -i "" -e "/^VERSION=/s|.*|VERSION=\"$ver\"|" contrib/solaris-package/pkginfo
|
sed_i -e "/^VERSION=/s|.*|VERSION=\"$ver\"|" contrib/solaris-package/pkginfo
|
||||||
)
|
)
|
||||||
$local && exit
|
$local && exit
|
||||||
echo "Creating ../conserver-$ver.tar.gz"
|
echo "Creating ../conserver-$ver.tar.gz"
|
||||||
|
Loading…
Reference in New Issue
Block a user