diff options
| author | Domen Kožar <domen@dev.si> | 2015-01-08 10:25:04 +0100 |
|---|---|---|
| committer | Domen Kožar <domen@dev.si> | 2015-01-08 10:25:04 +0100 |
| commit | 1eeb4b3c511757b757339d7e43f31cba8355c6df (patch) | |
| tree | b2843756046bce2ab48b4baca3bfd178a86c4eca | |
| parent | Introduce patchShebangsPhase ran in preConfigurePhases (diff) | |
| download | nixpkgs-origin/staging.patchShebangs.tar.gz | |
While patching shebangs in source, keep the modification dateorigin/staging.patchShebangsgitlab.intr/staging.patchShebangs
Otherwise this triggers automake/autoconf/m4 dependencies that
are redundant because of the trivial change.
| -rw-r--r-- | pkgs/build-support/setup-hooks/patch-shebangs.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkgs/build-support/setup-hooks/patch-shebangs.sh b/pkgs/build-support/setup-hooks/patch-shebangs.sh index c51fce708f35..50c1e391c33d 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 |
