nixpkgs/nixos/modules/services/networking/ircd-hybrid/builder.sh
Eelco Dolstra 40f7b0f9df Another attempt to eradicate ensureDir
See c556a6ea46e71e1907d78b71fab36df30297b3ad.
2014-06-30 14:56:10 +02:00

32 lines
659 B
Bash

source $stdenv/setup
doSub() {
local src=$1
local dst=$2
mkdir -p $(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
mkdir -p $out/bin