mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
While patching shebangs in source, keep the modification date
Otherwise this triggers automake/autoconf/m4 dependencies that are redundant because of the trivial change.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user