* Allow the result to be stored somewhere else than $out.
svn path=/nixpkgs/trunk/; revision=6978
This commit is contained in:
parent
986ec9c8a1
commit
36b1473e09
@ -3,14 +3,20 @@ source $substitute
|
|||||||
|
|
||||||
args=
|
args=
|
||||||
|
|
||||||
|
target=$out
|
||||||
|
if test -n "$dir"; then
|
||||||
|
target=$out/$dir/$name
|
||||||
|
ensureDir $out/$dir
|
||||||
|
fi
|
||||||
|
|
||||||
# Select all environment variables that start with a lowercase character.
|
# Select all environment variables that start with a lowercase character.
|
||||||
for envVar in $(env | sed "s/^[^a-z].*//" | sed "s/^\([^=]*\)=.*/\1/"); do
|
for envVar in $(env | sed "s/^[^a-z].*//" | sed "s/^\([^=]*\)=.*/\1/"); do
|
||||||
echo "$envVar -> ${!envVar}"
|
echo "$envVar -> ${!envVar}"
|
||||||
args="$args --subst-var $envVar"
|
args="$args --subst-var $envVar"
|
||||||
done
|
done
|
||||||
|
|
||||||
substitute $src $out $args
|
substitute $src $target $args
|
||||||
|
|
||||||
if test -n "$isExecutable"; then
|
if test -n "$isExecutable"; then
|
||||||
chmod +x $out
|
chmod +x $target
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user