lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

patchShebangs: preserve times, resolves #33084

Close #33281. Edits by vcunat:
- use Eelco's idea: empty file instead of full copy
- use longer name suffix to decrease the likelihood of collision

authored by

Yegor Timoshenko and committed by
Vladimír Čunát
4b1b6ee6 ba6e0ae3

+4
+4
pkgs/build-support/setup-hooks/patch-shebangs.sh
··· 54 54 echo "$f: interpreter directive changed from \"$oldInterpreterLine\" to \"$newInterpreterLine\"" 55 55 # escape the escape chars so that sed doesn't interpret them 56 56 escapedInterpreterLine=$(echo "$newInterpreterLine" | sed 's|\\|\\\\|g') 57 + # Preserve times, see: https://github.com/NixOS/nixpkgs/pull/33281 58 + touch -r "$f" "$f.timestamp" 57 59 sed -i -e "1 s|.*|#\!$escapedInterpreterLine|" "$f" 60 + touch -r "$f.timestamp" "$f" 61 + rm "$f.timestamp" 58 62 fi 59 63 fi 60 64 done