summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorXuefer <xuefer@gmail.com>2015-06-28 15:05:00 +0800
committerXuefer <xuefer@gmail.com>2015-07-03 13:02:03 +0800
commit10fcce4917c3e95d4fa012d0ee229c892771b9eb (patch)
tree65d5e928c67a899adcb0af05788cae768df4ab05 /devel
parent749747211a61899b4330435d936486ab47459604 (diff)
downloadxcache-10fcce4917c3e95d4fa012d0ee229c892771b9eb.tar.gz
xcache-10fcce4917c3e95d4fa012d0ee229c892771b9eb.zip
devel: dont update devel.php if unchanged
Diffstat (limited to 'devel')
-rwxr-xr-xdevel/run7
1 files changed, 6 insertions, 1 deletions
diff --git a/devel/run b/devel/run
index 98c6907..e79b450 100755
--- a/devel/run
+++ b/devel/run
@@ -340,7 +340,12 @@ run() {
< "$1" \
sed -r -e 's#__#____#g' \
| cpp -C -P -traditional-cpp -undef -ffreestanding -DPHP_VERSION=$phpVersion \
- | sed -r -e 's#^ +##g' -e 's#\t +#\t#g' -e 's#____#__#g' > devel.php || exit $?
+ | sed -r -e 's#^ +##g' -e 's#\t +#\t#g' -e 's#____#__#g' > devel.php.tmp || exit $?
+ if [[ ! -e devel.php ]] || ! cmp devel.php.tmp devel.php >/dev/null; then
+ cat devel.php.tmp > devel.php
+ else
+ rm -f devel.php.tmp
+ fi
shift
set -- devel.php "$@"
;;