Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

Fix patchShebangs on SmartOS

Tail is very picky about the space after -c
when compiled by Nix on Illumos (no idea why).

+2 -2
+2 -2
pkgs/build-support/setup-hooks/patch-shebangs.sh
··· 19 local newInterpreterLine 20 21 find "$dir" -type f -perm -0100 | while read f; do 22 - if [ "$(head -1 "$f" | head -c +2)" != '#!' ]; then 23 # missing shebang => not a script 24 continue 25 fi 26 27 - oldInterpreterLine=$(head -1 "$f" | tail -c +3) 28 read -r oldPath arg0 args <<< "$oldInterpreterLine" 29 30 if $(echo "$oldPath" | grep -q "/bin/env$"); then
··· 19 local newInterpreterLine 20 21 find "$dir" -type f -perm -0100 | while read f; do 22 + if [ "$(head -1 "$f" | head -c+2)" != '#!' ]; then 23 # missing shebang => not a script 24 continue 25 fi 26 27 + oldInterpreterLine=$(head -1 "$f" | tail -c+3) 28 read -r oldPath arg0 args <<< "$oldInterpreterLine" 29 30 if $(echo "$oldPath" | grep -q "/bin/env$"); then