cookutils rev 260

cook: fix for set -e now ised for genpkg_rules (build fails if copying pixmaps fails)
author Christophe Lincoln <pankso@slitaz.org>
date Thu Jun 02 04:38:46 2011 +0200 (2011-06-02)
parents 2db13a8fe9b4
children 677fbd5cf708
files cook
line diff
     1.1 --- a/cook	Wed Jun 01 03:23:23 2011 +0200
     1.2 +++ b/cook	Thu Jun 02 04:38:46 2011 +0200
     1.3 @@ -335,12 +335,12 @@
     1.4  {
     1.5  	# $LOCALE is set in cook.conf
     1.6  	if [ "$LOCALE"  ]; then
     1.7 -		if [ -d "$_pkg/usr/share/locale" ]; then
     1.8 +		if [ -d "$install/usr/share/locale" ]; then
     1.9  			mkdir -p $fs/usr/share/locale
    1.10  			for i in $LOCALE
    1.11  			do
    1.12 -				if [ -d "$_pkg/usr/share/locale/$i" ]; then
    1.13 -					cp -a $_pkg/usr/share/locale/$i $fs/usr/share/locale
    1.14 +				if [ -d "$install/usr/share/locale/$i" ]; then
    1.15 +					cp -a $install/usr/share/locale/$i $fs/usr/share/locale
    1.16  				fi
    1.17  			done
    1.18  		fi
    1.19 @@ -348,12 +348,12 @@
    1.20  
    1.21  	# Generic pixmaps copy can be disabled with GENERIC_PIXMAPS="no"
    1.22  	if [ "$GENERIC_PIXMAPS" != "no" ]; then
    1.23 -		if [ -d "$_pkg/usr/share/pixmaps" ]; then
    1.24 +		if [ -d "$install/usr/share/pixmaps" ]; then
    1.25  			mkdir -p $fs/usr/share/pixmaps
    1.26 -			cp -a $_pkg/usr/share/pixmaps/$PACKAGE.png \
    1.27 -				$fs/usr/share/pixmaps 2>/dev/null
    1.28 -			cp -a $_pkg/usr/share/pixmaps/$PACKAGE.xpm \
    1.29 -				$fs/usr/share/pixmaps 2>/dev/null
    1.30 +			cp -a $install/usr/share/pixmaps/$PACKAGE.png \
    1.31 +				$fs/usr/share/pixmaps 2>/dev/null || return 0
    1.32 +			cp -a $install/usr/share/pixmaps/$PACKAGE.xpm \
    1.33 +				$fs/usr/share/pixmaps 2>/dev/null || return 0
    1.34  		fi
    1.35  
    1.36  		# Custom or homemade PNG pixmap can be in stuff.
    1.37 @@ -364,8 +364,8 @@
    1.38  	fi
    1.39  
    1.40  	# Desktop entry (.desktop).
    1.41 -	if [ -d "$_pkg/usr/share/applications" ]; then
    1.42 -		cp -a $_pkg/usr/share/applications $fs/usr/share
    1.43 +	if [ -d "$install/usr/share/applications" ]; then
    1.44 +		cp -a $install/usr/share/applications $fs/usr/share
    1.45  	fi
    1.46  
    1.47  	# Homemade desktop file(s) can be in stuff.