SOURCES: entrance.gen-conf - check if theme exists and change it t...
sparky
sparky at pld-linux.org
Sun Oct 30 16:45:48 CET 2005
Author: sparky Date: Sun Oct 30 15:45:48 2005 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- check if theme exists and change it to default if not
---- Files affected:
SOURCES:
entrance.gen-conf (1.4 -> 1.5)
---- Diffs:
================================================================
Index: SOURCES/entrance.gen-conf
diff -u SOURCES/entrance.gen-conf:1.4 SOURCES/entrance.gen-conf:1.5
--- SOURCES/entrance.gen-conf:1.4 Sun Oct 30 13:19:54 2005
+++ SOURCES/entrance.gen-conf Sun Oct 30 16:45:43 2005
@@ -6,6 +6,7 @@
CONFIGOUT="/tmp/build_config.sh"
SESSIONS="/tmp/sessions"
ICONDIR="/usr/share/entrance/images/sessions"
+THEMEDIR="/usr/share/entrance/themes"
die() {
echo "$2" >&2
@@ -52,6 +53,14 @@
NUM=$(($NUM+1))
done
-sed -e "s/@auth_mode@/1/" -e "s/@COUNT@/$NUM/" $CONFIGIN > $CONFIGOUT
+THEME=$(grep entrance/theme $CONFIGIN | sed 's/.*\s//; s/"//g')
+OLDT=
+NEWT=
+if ! [ -r $THEMEDIR/$THEME ]; then
+ OLDT=$(grep entrance/theme $CONFIGIN | sed 's/.*\s//')
+ NEWT=$(ls $THEMEDIR | head -n 1)
+fi
+
+sed -e "s/@auth_mode@/1/" -e "s/@COUNT@/$NUM/" -e "s/$OLDT/$NEWT/" $CONFIGIN > $CONFIGOUT
chmod 755 $CONFIGOUT
exec $CONFIGOUT
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/entrance.gen-conf?r1=1.4&r2=1.5&f=u
More information about the pld-cvs-commit
mailing list