* substitute: support patterns starting with a dash.

* Updated the kernel headers.
* ghc: setup hooks are now generated using substituteAll.

svn path=/nixpkgs/branches/stdenv-updates-merge/; revision=10838
This commit is contained in:
Eelco Dolstra
2008-02-22 18:19:04 +00:00
parent 359e488921
commit 2e92cabb37
7 changed files with 16 additions and 26 deletions

View File

@@ -249,10 +249,6 @@ substitute() {
local -a params=("$@")
local -a args=()
local sedScript=$NIX_BUILD_TOP/.sedargs
rm -f $sedScript
touch $sedScript
local n p pattern replacement varName
for ((n = 2; n < ${#params[*]}; n += 1)); do
@@ -284,7 +280,7 @@ substitute() {
args[${#args[@]}]="$replacement"
done
replace-literal -e -s "${args[@]}" < "$input" > "$output".tmp
replace-literal -e -s -- "${args[@]}" < "$input" > "$output".tmp
if test -x "$output"; then
chmod +x "$output".tmp
fi