wok-next diff jwm/receipt @ rev 12404

Add configs files from slitaz-configs
author Christophe Lincoln <pankso@slitaz.org>
date Fri Apr 20 16:51:07 2012 +0200 (2012-04-20)
parents 1505de7c87b2
children 612c43caa4ec
line diff
     1.1 --- a/jwm/receipt	Tue Mar 06 14:16:20 2012 +0100
     1.2 +++ b/jwm/receipt	Fri Apr 20 16:51:07 2012 +0200
     1.3 @@ -38,3 +38,22 @@
     1.4  	cp $stuff/simple.jwmrc $fs/etc/jwm/simple.jwmrc
     1.5  	cp $stuff/slitaz.jwmrc $fs/etc/jwm/system.jwmrc
     1.6  }
     1.7 +
     1.8 +post_install()
     1.9 +{
    1.10 +	res=$(cat $1/etc/slim.conf | grep ^session | sed s/"sessions. *"//)
    1.11 +	# Adding WM to SLIM available sessions.
    1.12 +	if ! echo "$res" | grep -q $PACKAGE; then
    1.13 +		echo -n "Adding $PACKAGE to /etc/slim.conf..."
    1.14 +		sed -i "s/^sessions.*/sessions            ${res},$PACKAGE/" $1/etc/slim.conf
    1.15 +		status
    1.16 +	fi
    1.17 +}
    1.18 +
    1.19 +post_remove()
    1.20 +{
    1.21 +	# Remove WM from SLIM available sessions.
    1.22 +	if grep -q $PACKAGE $1/etc/slim.conf; then
    1.23 +		sed -i s/,$PACKAGE// $1/etc/slim.conf
    1.24 +	fi
    1.25 +}