vuls: init at 0.27.0
[NixPkgs.git] / nixos / modules / tasks / tty-backgrounds-combine.sh
blob55c3a1ebfa8abb3cde12a8f9a676dab82a81d7c1
1 source $stdenv/setup
3 ttys=($ttys)
4 themes=($themes)
6 mkdir -p $out
8 defaultName=$(cd $default && ls | grep -v default)
9 echo $defaultName
10 ln -s $default/$defaultName $out/$defaultName
11 ln -s $defaultName $out/default
13 for ((n = 0; n < ${#ttys[*]}; n++)); do
14 tty=${ttys[$n]}
15 theme=${themes[$n]}
17 echo "TTY $tty -> $theme"
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
26 if test -e $out/$tty; then
27 echo "Multiple themes defined for the same TTY!"
28 exit 1
31 ln -sfn $themeName $out/$tty
32 done