Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=e3340c541f7967f0a737eff37af920b1c57bb66f
commit e3340c541f7967f0a737eff37af920b1c57bb66f Author: Michel Hermier <[email protected]> Date: Mon Nov 26 13:11:15 2012 +0100 scripts/makepkg * Fix broken logic in makepkg_ccache. diff --git a/scripts/makepkg b/scripts/makepkg index 91fb099..3e5a3eb 100755 --- a/scripts/makepkg +++ b/scripts/makepkg @@ -1995,26 +1995,29 @@ makepkg_ccache() { "$@" continue ;; *) error "Optional parameter \"$1\" has unsupported format" - exit 1 ;; + return 1 ;; esac if ! shift "$consumed"; then consumed=$(($consumed - 1)) error "Option $1 expects $consumed argument(s)" - exit 1 + return 1 fi done - for i in "$@"; do - if [ -n "$cache" -a -d "$CCACHE_BASEDIR/$i" ]; then - msg "$cache: Cleaning up the compiler cache." - CCACHE_DIR="$CCACHE_BASEDIR/$i" ccache -C - else - error "$i: No compiler cache available" - fi - done - msg "Cleaning up the compiler cache." - CCACHE_DIR="$CCACHE_BASEDIR" ccache -C - return 1 + if [ $clean_all -eq 1 ]; then + msg "Cleaning up the compiler cache." + CCACHE_DIR="$CCACHE_BASEDIR" ccache -C + else + for i in "$@"; do + if [ -n "$cache" -a -d "$CCACHE_BASEDIR/$i" ]; then + msg "$cache: Cleaning up the compiler cache." + CCACHE_DIR="$CCACHE_BASEDIR/$i" ccache -C + else + error "$i: No compiler cache available" + fi + done + fi + return 0 } makepkg_clean() { _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
