summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko2010-07-04 23:34:02 +0200
committerDenys Vlasenko2010-07-04 23:34:02 +0200
commit08f0b784fd4351929090c877605762d664e70098 (patch)
treecd4674f92b0e2eb5276fffe3a3c41eb869f21bc8
parent7e1bb4bc5c1e2724a00bb4ef18925c8ed6f44886 (diff)
downloadbusybox-08f0b784fd4351929090c877605762d664e70098.zip
busybox-08f0b784fd4351929090c877605762d664e70098.tar.gz
Yet another attempt to stamp out "make -j" problems
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rwxr-xr-xapplets/usage_compressed8
1 files changed, 7 insertions, 1 deletions
diff --git a/applets/usage_compressed b/applets/usage_compressed
index bfd5aa8..9ddf16d 100755
--- a/applets/usage_compressed
+++ b/applets/usage_compressed
@@ -9,7 +9,7 @@ test -x "$loc/usage" || exit 1
test "$SED" || SED=sed
test "$DD" || DD=dd
-exec >"$target"
+exec >"$target.$$"
echo '#define UNPACKED_USAGE "" \'
"$loc/usage" | od -v -t x1 \
@@ -39,3 +39,9 @@ echo '#define PACKED_USAGE \'
-e 's/\(..\)/0x\1,/g' \
-e 's/$/ \\/'
echo ''
+
+if cmp -s "$target.$$" "$target" 2>/dev/null; then
+ rm -- "$target.$$"
+else
+ mv -- "$target.$$" "$target"
+fi