wok diff rpm4/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 17e313b5b9c1
children 6fab3264ba87
line diff
     1.1 --- a/rpm4/receipt	Tue Feb 17 09:42:47 2015 +0100
     1.2 +++ b/rpm4/receipt	Sun Dec 20 15:13:45 2015 +0100
     1.3 @@ -78,19 +78,19 @@
     1.4  
     1.5  pre_remove()
     1.6  {
     1.7 -	if [ -d $1/var/lib/rpm ]; then
     1.8 -		rm -f $1/var/lib/rpm/*
     1.9 +	if [ -d "$1/var/lib/rpm" ]; then
    1.10 +		rm -f "$1"/var/lib/rpm/*
    1.11  	fi
    1.12  }
    1.13  
    1.14  post_remove()
    1.15  {
    1.16  	echo "Processing post remove commands..."
    1.17 -	cmd=`readlink $root/bin/rpm`
    1.18 +	cmd=$(readlink "$1/bin/rpm")
    1.19      	if [ ! "$cmd" = "/bin/rpm" ]; then
    1.20  		echo -n "Restore applets from busybox..."
    1.21 -		ln -sf $root/bin/busybox $root/bin/rpm
    1.22 -		ln -sf $root/bin/busybox $root/usr/bin/rpm2cpio
    1.23 +		ln -sf /bin/busybox "$1/bin/rpm"
    1.24 +		ln -sf /bin/busybox "$1/usr/bin/rpm2cpio"
    1.25  		status
    1.26  	fi
    1.27  }