mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 10:27:35 +00:00
Meta: Remove write-only-on-difference script
It's now been replaced with "${CMAKE_PROGRAM}" -E copy_if_different in all previous usage locations.
This commit is contained in:
parent
63956b36d0
commit
834be1a895
2 changed files with 0 additions and 30 deletions
|
@ -1,28 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$#" -lt "2" ]; then
|
||||
echo "USAGE: $0 <file> <cmd...>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DST_FILE="$1"
|
||||
shift
|
||||
|
||||
# Just in case:
|
||||
mkdir -p -- "$(dirname -- "${DST_FILE}")"
|
||||
|
||||
cleanup()
|
||||
{
|
||||
rm -f -- "${DST_FILE}.tmp"
|
||||
}
|
||||
trap cleanup 0 1 2 3 6
|
||||
|
||||
"$@" > "${DST_FILE}.tmp"
|
||||
# If we get here, the command was successful, and we can overwrite the destination.
|
||||
|
||||
if ! cmp -s -- "${DST_FILE}.tmp" "${DST_FILE}"; then
|
||||
# File changed, need to overwrite:
|
||||
mv -f -- "${DST_FILE}.tmp" "${DST_FILE}"
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue