From: gobo72@gmail.com Date: Sat, 11 Aug 2012 19:39:23 +0000 (+0000) Subject: Retourne une erreur si un custom script est spécifié mais n'existe pas. X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=2d1f978cb0d80f379521294e190acc2c8dad8382;p=hvlinux.git Retourne une erreur si un custom script est spécifié mais n'existe pas. --- diff --git a/functions/ipkg b/functions/ipkg index 8ac0a09..f948ac3 100644 --- a/functions/ipkg +++ b/functions/ipkg @@ -125,9 +125,11 @@ ipkg_script() if [ $# -eq 1 ]; then # Use supplied script name PACKAGE_DEF=${SCRDIR}/pkg/${1} + CUSTOM_PACKAGE_DEF=yes else # Use default script name PACKAGE_DEF=${SCRDIR}/pkg/$(get_pkg_name ${PACKAGE}) + CUSTOM_PACKAGE_DEF=no fi if [ "x${DECOMPRESS}" = "x1" ]; then @@ -139,6 +141,9 @@ ipkg_script() if [ -f ${PACKAGE_DEF} ]; then echo "Load custom package functions and definitions from ${PACKAGE_DEF}" source ${PACKAGE_DEF} + elif [ "x${CUSTOM_PACKAGE_DEF}" = "xyes" ]; then + echo "Missing custom package definition file ${PACKAGE_DEF}" + return 1 fi # Execute pre-patch function if applicable