wok rev 3114

Awesome: add entry into Slim sessions
author Mallory MOLLO <mallory@skyrock.com>
date Mon May 18 20:45:20 2009 +0200 (2009-05-18)
parents 192bfaa1ae87
children 8add1c162d49
files awesome/receipt
line diff
     1.1 --- a/awesome/receipt	Mon May 18 20:44:43 2009 +0200
     1.2 +++ b/awesome/receipt	Mon May 18 20:45:20 2009 +0200
     1.3 @@ -31,3 +31,22 @@
     1.4  	cp -a $_pkg/usr/share $fs/usr
     1.5  }
     1.6  
     1.7 +post_install()
     1.8 +{
     1.9 +	res=`cat $1/etc/slim.conf | grep ^session | sed s/"sessions. *"//`
    1.10 +	# Adding WM to SLIM available sessions.
    1.11 +	if ! echo "$res" | grep -q $PACKAGE; then
    1.12 +		echo -n "Adding $PACKAGE to /etc/slim.conf..."
    1.13 +		sed -i "s/^sessions.*/sessions            ${res},$PACKAGE/" /etc/slim.conf
    1.14 +		status
    1.15 +	fi
    1.16 +}
    1.17 +
    1.18 +post_remove()
    1.19 +{
    1.20 +	# Remove WM from SLIM available sessions.
    1.21 +	if grep -q $PACKAGE $1/etc/slim.conf; then
    1.22 +		sed -i s/,$PACKAGE// $1/etc/slim.conf
    1.23 +	fi
    1.24 +}
    1.25 +