wok rev 13571

lxde: Add local root variable to post_install and post_remove scripts so tazpkg --root will work with it.
author Christopher Rogers <slaxemulator@gmail.com>
date Sun Nov 04 09:14:01 2012 +0000 (2012-11-04)
parents 9f84fa885954
children 90f1623aac5e
files lxde/receipt
line diff
     1.1 --- a/lxde/receipt	Sat Nov 03 16:23:37 2012 +0100
     1.2 +++ b/lxde/receipt	Sun Nov 04 09:14:01 2012 +0000
     1.3 @@ -9,7 +9,7 @@
     1.4  TAGS="wm desktop"
     1.5  SUGGESTED="lxterminal lxdm pcmanfm"
     1.6  
     1.7 -DEPENDS="xorg-libX11 gtk+ lxpanel lxtask lxappearance lxsession
     1.8 +DEPENDS="xorg-libX11 gtk+ lxpanel lxtask lxappearance lxsession \
     1.9  lxsession-edit lxrandr lxinput openbox obconf viewnior leafpad \
    1.10  slitaz-configs"
    1.11  
    1.12 @@ -27,6 +27,8 @@
    1.13  # Add WM to SLIM available sessions.
    1.14  post_install()
    1.15  {
    1.16 +	local root
    1.17 +	root=$1
    1.18  	res=$(cat $root/etc/slim.conf | grep ^session | sed s/"sessions. *"//)
    1.19  	if ! echo "$res" | grep -q $PACKAGE; then
    1.20  		echo -n "Adding $PACKAGE to /etc/slim.conf..."
    1.21 @@ -38,6 +40,8 @@
    1.22  # Remove WM from SLIM available sessions.
    1.23  post_remove()
    1.24  {
    1.25 +	local root
    1.26 +	root=$1
    1.27  	if grep -q $PACKAGE $root/etc/slim.conf; then
    1.28  		sed -i s/,$PACKAGE// $root/etc/slim.conf
    1.29  	fi