diff --git a/build/clean.sh b/build/clean.sh index 078921c..109e7a0 100644 --- a/build/clean.sh +++ b/build/clean.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (c) 2014-2019 Franco Fichtner +# Copyright (c) 2014-2020 Franco Fichtner # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -45,9 +45,10 @@ for ARG in ${@}; do echo ">>> Removing core from packages set" setup_stage ${STAGEDIR} setup_base ${STAGEDIR} - extract_packages ${STAGEDIR} - remove_packages ${STAGEDIR} ${PRODUCT_CORES} - bundle_packages ${STAGEDIR} '' core + if extract_packages ${STAGEDIR}; then + remove_packages ${STAGEDIR} ${PRODUCT_CORES} + bundle_packages ${STAGEDIR} '' core + fi ;; distfiles) echo ">>> Removing distfiles set" @@ -91,9 +92,10 @@ for ARG in ${@}; do echo ">>> Removing plugins from packages set" setup_stage ${STAGEDIR} setup_base ${STAGEDIR} - extract_packages ${STAGEDIR} - remove_packages ${STAGEDIR} ${PRODUCT_PLUGINS} - bundle_packages ${STAGEDIR} '' plugins + if extract_packages ${STAGEDIR}; then + remove_packages ${STAGEDIR} ${PRODUCT_PLUGINS} + bundle_packages ${STAGEDIR} '' plugins + fi ;; release) echo ">>> Removing release set" diff --git a/build/common.sh b/build/common.sh index 88c1ee3..3360ddb 100644 --- a/build/common.sh +++ b/build/common.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (c) 2014-2019 Franco Fichtner +# Copyright (c) 2014-2020 Franco Fichtner # Copyright (c) 2010-2011 Scott Ullrich # # Redistribution and use in source and binary forms, with or without @@ -696,7 +696,10 @@ extract_packages() PACKAGESET=$(find ${SETSDIR} -name "packages-*-${PRODUCT_FLAVOUR}-${PRODUCT_ARCH}.tar") if [ -f "${PACKAGESET}" ]; then tar -C ${BASEDIR}${PACKAGESDIR} -xpf ${PACKAGESET} + return 0 fi + + return 1 } search_packages()