3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/helpers/unpack-theme.sh
Eelco Dolstra 6ef8fe2a31 * Use unpackFile so that gzipped themes also work.
svn path=/nixos/trunk/; revision=10061
2008-01-03 16:03:11 +00:00

19 lines
433 B
Bash

source $stdenv/setup
ensureDir $out
(cd $out && unpackFile $theme)
themeName=$(cd $out && ls)
for i in $out/$themeName/config/*.cfg; do
echo "converting $i"
# Rewrite /etc paths. Also, the file names
# config/bootsplash-<RES>.cfg should be <RES>.cfg.
sed "s^/etc/bootsplash/themes^$out^g" < $i > $out/$themeName/$(basename $i | sed 's^.*-^^')
done
rm $out/$themeName/config/*.cfg
ln -s $themeName $out/default