summaryrefslogtreecommitdiff
path: root/tool/ifchange
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-13 12:30:24 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-13 12:30:24 +0000
commitf28ec8da8c08a90b19c85ceef0ee717c886d7841 (patch)
tree3c8bdc0399b48ae990c2164bcaab4d567b7e66a8 /tool/ifchange
parente6226e2c9d6baafd4ba3efbdd0464ce28c3b2b0d (diff)
no alternate value expansion
* configure.in (opt-dir), tool/ifchange: get rid of "alternate value" expansion for legacy sh. [ruby-dev:47420] [Bug #8524] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/ifchange')
-rwxr-xr-xtool/ifchange3
1 files changed, 2 insertions, 1 deletions
diff --git a/tool/ifchange b/tool/ifchange
index 5ff8276..c54b8fb 100755
--- a/tool/ifchange
+++ b/tool/ifchange
@@ -1,6 +1,7 @@
#!/bin/sh
# usage: ifchange target temporary
+set -e
timestamp=
keepsuffix=
until [ "$0" = 0 ]; do
@@ -37,7 +38,7 @@ if cmp "$target" "$temp" >/dev/null 2>&1; then
rm -f "$temp"
else
echo "$target updated"
- ${keepsuffix:+ mv -f "$target" "${target}${keepsuffix}" }
+ [ x"${keepsuffix}" = x ] || mv -f "$target" "${target}${keepsuffix}"
mv -f "$temp" "$target"
fi