From: Yan, Zheng Date: Mon, 17 Aug 2015 02:44:44 +0000 (+0800) Subject: ceph: use 'sed -ie' to edit file in-place X-Git-Tag: v9.1.0~259^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d36e514935550a770570309f66de7e8d9b6f3241;p=ceph.git ceph: use 'sed -ie' to edit file in-place On OSX, 'sed -i script' does not work, because it considers 'script' as suffix of backup file. 'sed -ie script' works on both OSX and Linux. Signed-off-by: Yan, Zheng --- diff --git a/src/Makefile-client.am b/src/Makefile-client.am index 7e8c7165f441f..dcd18359962e8 100644 --- a/src/Makefile-client.am +++ b/src/Makefile-client.am @@ -20,9 +20,9 @@ bin_PROGRAMS += ceph-syn ceph: ceph.in ./ceph_ver.h Makefile rm -f $@ $@.tmp cp $@.in $@.tmp - sed -i "s|@PYTHON_EXECUTABLE@|/usr/bin/env python|" $@.tmp - grep CEPH_GIT_NICE_VER ./ceph_ver.h | cut -f 3 -d " " | sed s/\"//g | xargs -I "{}" sed -i "s/@CEPH_GIT_NICE_VER@/{}/g" $@.tmp - grep CEPH_GIT_VER ./ceph_ver.h | cut -f 3 -d " " | sed s/\"//g | xargs -I "{}" sed -i "s/@CEPH_GIT_VER@/{}/g" $@.tmp + sed -ie "s|@PYTHON_EXECUTABLE@|/usr/bin/env python|" $@.tmp + grep CEPH_GIT_NICE_VER ./ceph_ver.h | cut -f 3 -d " " | sed s/\"//g | xargs -I "{}" sed -ie "s/@CEPH_GIT_NICE_VER@/{}/g" $@.tmp + grep CEPH_GIT_VER ./ceph_ver.h | cut -f 3 -d " " | sed s/\"//g | xargs -I "{}" sed -ie "s/@CEPH_GIT_VER@/{}/g" $@.tmp cat $(srcdir)/$@.in >>$@.tmp chmod a+x $@.tmp chmod a-w $@.tmp