From 834be1a895169b8f17a78266fc34075e665f714c Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Sat, 14 Aug 2021 14:17:06 -0600 Subject: [PATCH] Meta: Remove write-only-on-difference script It's now been replaced with "${CMAKE_PROGRAM}" -E copy_if_different in all previous usage locations. --- CMakeLists.txt | 2 -- Meta/write-only-on-difference.sh | 28 ---------------------------- 2 files changed, 30 deletions(-) delete mode 100755 Meta/write-only-on-difference.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index 06ff0cd525e..27dc1713fb2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -145,8 +145,6 @@ include_directories(Userland/Libraries) include_directories(.) include_directories(${CMAKE_BINARY_DIR}) -set(write_if_different ${CMAKE_SOURCE_DIR}/Meta/write-only-on-difference.sh) - add_subdirectory(Meta/Lagom) find_program(CCACHE_PROGRAM ccache) diff --git a/Meta/write-only-on-difference.sh b/Meta/write-only-on-difference.sh deleted file mode 100755 index ecddbc7c590..00000000000 --- a/Meta/write-only-on-difference.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -set -e - -if [ "$#" -lt "2" ]; then - echo "USAGE: $0 " - 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