]> git.pld-linux.org Git - packages/entrance.git/commitdiff
- check if theme exists and change it to default if not
authorsparky <sparky@pld-linux.org>
Sun, 30 Oct 2005 15:45:43 +0000 (15:45 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    entrance.gen-conf -> 1.5

entrance.gen-conf

index c3f80c0de725d0fc8a2b3dacaf425ea153cae355..183aebb9ee156640ccf71ec31e4c5ad2b6f5190f 100644 (file)
@@ -6,6 +6,7 @@ CONFIGIN="/etc/X11/entrance/build_config.sh.in"
 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 @@ for DESKTOP in /tmp/default.desktop /usr/share/xsessions/*.desktop \
        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
This page took 0.10341 seconds and 4 git commands to generate.