# HG changeset patch # User Christophe Lincoln # Date 1306982326 -7200 # Node ID 6f8dda11e26a3774328b476bef852f0f881ee9fa # Parent 2db13a8fe9b4fea901e46e706c9b604625e5e759 cook: fix for set -e now ised for genpkg_rules (build fails if copying pixmaps fails) diff -r 2db13a8fe9b4 -r 6f8dda11e26a cook --- a/cook Wed Jun 01 03:23:23 2011 +0200 +++ b/cook Thu Jun 02 04:38:46 2011 +0200 @@ -335,12 +335,12 @@ { # $LOCALE is set in cook.conf if [ "$LOCALE" ]; then - if [ -d "$_pkg/usr/share/locale" ]; then + if [ -d "$install/usr/share/locale" ]; then mkdir -p $fs/usr/share/locale for i in $LOCALE do - if [ -d "$_pkg/usr/share/locale/$i" ]; then - cp -a $_pkg/usr/share/locale/$i $fs/usr/share/locale + if [ -d "$install/usr/share/locale/$i" ]; then + cp -a $install/usr/share/locale/$i $fs/usr/share/locale fi done fi @@ -348,12 +348,12 @@ # Generic pixmaps copy can be disabled with GENERIC_PIXMAPS="no" if [ "$GENERIC_PIXMAPS" != "no" ]; then - if [ -d "$_pkg/usr/share/pixmaps" ]; then + if [ -d "$install/usr/share/pixmaps" ]; then mkdir -p $fs/usr/share/pixmaps - cp -a $_pkg/usr/share/pixmaps/$PACKAGE.png \ - $fs/usr/share/pixmaps 2>/dev/null - cp -a $_pkg/usr/share/pixmaps/$PACKAGE.xpm \ - $fs/usr/share/pixmaps 2>/dev/null + cp -a $install/usr/share/pixmaps/$PACKAGE.png \ + $fs/usr/share/pixmaps 2>/dev/null || return 0 + cp -a $install/usr/share/pixmaps/$PACKAGE.xpm \ + $fs/usr/share/pixmaps 2>/dev/null || return 0 fi # Custom or homemade PNG pixmap can be in stuff. @@ -364,8 +364,8 @@ fi # Desktop entry (.desktop). - if [ -d "$_pkg/usr/share/applications" ]; then - cp -a $_pkg/usr/share/applications $fs/usr/share + if [ -d "$install/usr/share/applications" ]; then + cp -a $install/usr/share/applications $fs/usr/share fi # Homemade desktop file(s) can be in stuff.