From 1eeb4b3c511757b757339d7e43f31cba8355c6df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Thu, 8 Jan 2015 10:25:04 +0100 Subject: [PATCH] While patching shebangs in source, keep the modification date Otherwise this triggers automake/autoconf/m4 dependencies that are redundant because of the trivial change. --- pkgs/build-support/setup-hooks/patch-shebangs.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/build-support/setup-hooks/patch-shebangs.sh b/pkgs/build-support/setup-hooks/patch-shebangs.sh index c51fce708f3..50c1e391c33 100644 --- a/pkgs/build-support/setup-hooks/patch-shebangs.sh +++ b/pkgs/build-support/setup-hooks/patch-shebangs.sh @@ -59,7 +59,9 @@ patchShebangs() { echo "$f: interpreter directive changed from \"$oldInterpreterLine\" to \"$newInterpreterLine\"" # escape the escape chars so that sed doesn't interpret them escapedInterpreterLine=$(echo "$newInterpreterLine" | sed 's|\\|\\\\|g') + mod_time=$(stat --format=%y "$f") sed -i -e "1 s|.*|#\!$escapedInterpreterLine|" "$f" + touch -d "$mod_time" "$f" fi fi done