wok diff pybootchartgui/receipt @ rev 18730

Quote root dir in post_install
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Dec 20 15:13:45 2015 +0100 (2015-12-20)
parents bf4a09ef1d2e
children ed8073aa8cf0
line diff
     1.1 --- a/pybootchartgui/receipt	Fri Oct 18 22:13:53 2013 +0000
     1.2 +++ b/pybootchartgui/receipt	Sun Dec 20 15:13:45 2015 +0100
     1.3 @@ -25,22 +25,18 @@
     1.4  
     1.5  post_install()
     1.6  {
     1.7 -	local root
     1.8 -	root=$1
     1.9 -	PY_VERSION=`cat /var/lib/tazpkg/installed/python/receipt | grep "VERSION="|cut -d \" -f 2 | cut -d . -f 1,2`
    1.10 -	if [ -f  $root/usr/bin/pybootchartgui ] ; then rm $root/usr/bin/pybootchartgui ; fi
    1.11 -	ln -s $root/usr/lib/python$PY_VERSION/pybootchartgui.py $root/usr/bin/pybootchartgui
    1.12 -	if [ -f $root/etc/bootchartd.conf ] ; then
    1.13 -		sed -i s/'AUTO_RENDER="no"'/'AUTO_RENDER="yes"'/ $root/etc/bootchartd.conf
    1.14 +	PY_VERSION=$(cat "$1/var/lib/tazpkg/installed/python/receipt" | grep "VERSION="|cut -d \" -f 2 | cut -d . -f 1,2)
    1.15 +	if [ -f  "$1/usr/bin/pybootchartgui" ] ; then rm "$1/usr/bin/pybootchartgui" ; fi
    1.16 +	ln -s "$1/usr/lib/python$PY_VERSION/pybootchartgui.py" "$1/usr/bin/pybootchartgui"
    1.17 +	if [ -f "$1/etc/bootchartd.conf" ] ; then
    1.18 +		sed -i s/'AUTO_RENDER="no"'/'AUTO_RENDER="yes"'/ "$1/etc/bootchartd.conf"
    1.19  	fi
    1.20  }
    1.21  
    1.22  post_remove()
    1.23  {
    1.24 -	local root
    1.25 -	root=$1
    1.26 -    rm $root/usr/bin/pybootchartgui
    1.27 -    if [ -f $root/etc/bootchartd.conf ] ; then 
    1.28 -    	sed -i s/'AUTO_RENDER="yes"'/'AUTO_RENDER="no"'/ $root/etc/bootchartd.conf
    1.29 -    fi
    1.30 +  	rm "$1/usr/bin/pybootchartgui"
    1.31 + 	if [ -f "$1/etc/bootchartd.conf" ] ; then 
    1.32 + 		sed -i s/'AUTO_RENDER="yes"'/'AUTO_RENDER="no"'/ "$1/etc/bootchartd.conf"
    1.33 + 	fi
    1.34  }