2011-04-27 17:27:05 +01:00
|
|
|
source $stdenv/setup
|
|
|
|
|
|
|
|
doSub() {
|
|
|
|
local src=$1
|
|
|
|
local dst=$2
|
2014-06-30 13:56:10 +01:00
|
|
|
mkdir -p $(dirname $dst)
|
2011-04-27 17:27:05 +01:00
|
|
|
substituteAll $src $dst
|
|
|
|
}
|
|
|
|
|
|
|
|
subDir=/
|
|
|
|
for i in $scripts; do
|
|
|
|
if test "$(echo $i | cut -c1-2)" = "=>"; then
|
|
|
|
subDir=$(echo $i | cut -c3-)
|
|
|
|
else
|
2016-10-11 17:09:56 +01:00
|
|
|
dst=$out/$subDir/$(stripHash $i | sed 's/\.in//')
|
2011-04-27 17:27:05 +01:00
|
|
|
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
|
2016-10-11 17:09:56 +01:00
|
|
|
dst=$out/$subDir/$(stripHash $i | sed 's/\.in//')
|
2011-04-27 17:27:05 +01:00
|
|
|
doSub $i $dst
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2014-06-30 13:56:10 +01:00
|
|
|
mkdir -p $out/bin
|