nixpkgs/pkgs
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
..
applications Merge master into stdenv-updates 2013-12-29 10:01:22 +01:00
build-support
data hicolor_icon_theme: minor update 0.12 -> 0.13 2013-12-28 15:08:47 +01:00
desktops gnumeric: add schemas and icons, refactor 2013-12-28 15:45:20 +01:00
development gcc-4.{7,8}: hacky fix for parallel builds 2014-01-03 10:42:46 +01:00
games Merge master into stdenv-updates 2013-12-29 10:01:22 +01:00
misc Merge master into stdenv-updates 2013-12-29 10:01:22 +01:00
os-specific Change pmount download address and add platforms 2013-12-24 10:50:40 +01:00
servers Merge master into stdenv-updates 2013-12-29 10:01:22 +01:00
shells Merge master into stdenv-updates 2013-12-29 10:01:22 +01:00
stdenv stdenv/setup.sh: fix breakage when shebang contains '\' 2014-01-03 14:47:39 +01:00
test
tools Merge master into stdenv-updates 2013-12-29 10:01:22 +01:00
top-level Merge master into stdenv-updates 2013-12-29 10:01:22 +01:00