1source $stdenv/setup
2
3ttys=($ttys)
4themes=($themes)
5
6mkdir -p $out
7
8defaultName=$(cd $default && ls | grep -v default)
9echo $defaultName
10ln -s $default/$defaultName $out/$defaultName
11ln -s $defaultName $out/default
12
13for ((n = 0; n < ${#ttys[*]}; n++)); do
14 tty=${ttys[$n]}
15 theme=${themes[$n]}
16
17 echo "TTY $tty -> $theme"
18
19 if [ "$theme" != default ]; then
20 themeName=$(cd $theme && ls | grep -v default)
21 ln -sfn $theme/$themeName $out/$themeName
22 else
23 themeName=default
24 fi
25
26 if test -e $out/$tty; then
27 echo "Multiple themes defined for the same TTY!"
28 exit 1
29 fi
30
31 ln -sfn $themeName $out/$tty
32done