diff options
author | Danny Wilson <danny@prime.vc> | 2015-11-07 04:45:26 +0100 |
---|---|---|
committer | Danny Wilson <danny@prime.vc> | 2015-11-16 17:20:14 +0100 |
commit | f9134ca9df7281765ec1fcefc7636632b9ef11fb (patch) | |
tree | 79fac1e313500114374d07ca27771a92bd16418a /pkgs/build-support/setup-hooks/patch-shebangs.sh | |
parent | b19116f688b9444eb25ade4142be780b53febc93 (diff) | |
download | nixpkgs-f9134ca9df7281765ec1fcefc7636632b9ef11fb.tar nixpkgs-f9134ca9df7281765ec1fcefc7636632b9ef11fb.tar.gz nixpkgs-f9134ca9df7281765ec1fcefc7636632b9ef11fb.tar.bz2 nixpkgs-f9134ca9df7281765ec1fcefc7636632b9ef11fb.tar.lz nixpkgs-f9134ca9df7281765ec1fcefc7636632b9ef11fb.tar.xz nixpkgs-f9134ca9df7281765ec1fcefc7636632b9ef11fb.tar.zst nixpkgs-f9134ca9df7281765ec1fcefc7636632b9ef11fb.zip |
Fix patchShebangs on SmartOS
Tail is very picky about the space after -c when compiled by Nix on Illumos (no idea why).
Diffstat (limited to 'pkgs/build-support/setup-hooks/patch-shebangs.sh')
-rw-r--r-- | pkgs/build-support/setup-hooks/patch-shebangs.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/build-support/setup-hooks/patch-shebangs.sh b/pkgs/build-support/setup-hooks/patch-shebangs.sh index 9d8cd0217a5..38660718d0e 100644 --- a/pkgs/build-support/setup-hooks/patch-shebangs.sh +++ b/pkgs/build-support/setup-hooks/patch-shebangs.sh @@ -19,12 +19,12 @@ patchShebangs() { local newInterpreterLine find "$dir" -type f -perm -0100 | while read f; do - if [ "$(head -1 "$f" | head -c +2)" != '#!' ]; then + if [ "$(head -1 "$f" | head -c+2)" != '#!' ]; then # missing shebang => not a script continue fi - oldInterpreterLine=$(head -1 "$f" | tail -c +3) + oldInterpreterLine=$(head -1 "$f" | tail -c+3) read -r oldPath arg0 args <<< "$oldInterpreterLine" if $(echo "$oldPath" | grep -q "/bin/env$"); then |