mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 14:13:35 +00:00
32 lines
661 B
Bash
32 lines
661 B
Bash
|
source $stdenv/setup
|
||
|
|
||
|
doSub() {
|
||
|
local src=$1
|
||
|
local dst=$2
|
||
|
ensureDir $(dirname $dst)
|
||
|
substituteAll $src $dst
|
||
|
}
|
||
|
|
||
|
subDir=/
|
||
|
for i in $scripts; do
|
||
|
if test "$(echo $i | cut -c1-2)" = "=>"; then
|
||
|
subDir=$(echo $i | cut -c3-)
|
||
|
else
|
||
|
dst=$out/$subDir/$((stripHash $i; echo $strippedName) | sed 's/\.in//')
|
||
|
doSub $i $dst
|
||
|
chmod +x $dst # !!!
|
||
|
fi
|
||
|
done
|
||
|
|
||
|
subDir=/
|
||
|
for i in $substFiles; do
|
||
|
if test "$(echo $i | cut -c1-2)" = "=>"; then
|
||
|
subDir=$(echo $i | cut -c3-)
|
||
|
else
|
||
|
dst=$out/$subDir/$((stripHash $i; echo $strippedName) | sed 's/\.in//')
|
||
|
doSub $i $dst
|
||
|
fi
|
||
|
done
|
||
|
|
||
|
ensureDir $out/bin
|