nixpkgs/pkgs/stdenv
Bjørn Forsman f4f0d2ecb9 stdenv/setup.sh: fix breakage when shebang contains '\'
Some programs, e.g. guile-config, has a shebang that ends in '\':

  #!/usr/bin/guile-1.8 \
  -e main -s
  !#
  ;;;; guile-config --- utility for linking programs with Guile
  ;;;; Jim Blandy <jim@red-bean.com> --- September 1997

This currently breaks patchShebangs:

  $ read oldPath arg0 args <<< 'shebang \'; echo $?
  1
  $ echo $oldPath
  shebang
  $ echo $arg0

  $ echo $args

(And setup.sh/patchShebangs is run with 'set -e' so any command that
return non-zero aborts the build.)

Fix by telling 'read' to not interpret backslashes (with the -r flag):

  $ read -r oldPath arg0 args <<< 'shebang \'; echo $?
  0
  $ echo $oldPath
  shebang
  $ echo $arg0
  \
  $ echo $args

Also needed: escape the escape characters so that sed doesn't interpret
them.
2014-01-03 14:47:39 +01:00
..
generic stdenv/setup.sh: fix breakage when shebang contains '\' 2014-01-03 14:47:39 +01:00
linux Merge master into stdenv-updates 2013-07-08 10:48:05 +02:00
mingw stdenv/setup.sh: Always run postPatch hook. 2013-02-27 15:26:18 +01:00
native Add SmartOS native GCC path. 2013-02-28 20:04:04 +01:00
nix GCC 4.7.2 + updated libraries compiles on Illumos/SmartOS! 2013-02-28 20:04:02 +01:00
adapters.nix More renames 2012-12-28 19:42:10 +01:00
common-path.nix
default.nix Attempt at getting GCC 4.7 compiled on Illumos... 2013-02-28 20:04:01 +01:00