diff --git a/mp-pool/scripts/mp-pool-clean.sh b/mp-pool/scripts/mp-pool-clean.sh index e7e704c..30621d6 100755 --- a/mp-pool/scripts/mp-pool-clean.sh +++ b/mp-pool/scripts/mp-pool-clean.sh @@ -75,29 +75,35 @@ if [ ! -d "${distpath}" ]; then exit 1 fi -# source and store every package +# source and store every package files=("INFO" "LIST") pc="$(ls -1q "${srcpath}" | wc -l)" -pi=1 +pi=0 info "Sourcing all the packages" set_indent for pkg in "${srcpath}/"*; do - package=$(basename "${pkg}") - info "(${pi}/${pc}) Sourcing \"${package}\"" + pkg_name=$(basename "${pkg}") + pi=$((pi+1)) + + if should_ignore "${pkg_name}"; then + info "(${pi}/${pc}) Ignoring \"${pkg_name}\"" + continue + fi + + info "(${pi}/${pc}) Sourcing \"${pkg_name}\"" source "${pkg}/pkg.sh" - check_ret "(${pi}/${pc}) Failed to import the source script for \"${package}\"" + check_ret "(${pi}/${pc}) Failed to import the source script for \"${pkg_name}\"" check_pkg_vars check_ret - + files+=("${NAME}_${VERSION}.mpf") files+=("${NAME}_${VERSION}.mpf.sig") clean_pkg_vars - pi=$((pi+1)) done success "Completed" diff --git a/mp-pool/scripts/mp-pool.sh b/mp-pool/scripts/mp-pool.sh index 57f2010..d323fd5 100755 --- a/mp-pool/scripts/mp-pool.sh +++ b/mp-pool/scripts/mp-pool.sh @@ -205,16 +205,22 @@ fi # build every package pc=${#OPT_PACKAGES[@]} -pi=1 +pi=0 for pkg_name in "${OPT_PACKAGES[@]}"; do pkg="${srcpath}/${pkg_name}" + pi=$((pi+1)) if [ ! -d "${pkg}" ]; then error "Package not found: \"${pkg_name}\"" exit 1 fi + if should_ignore "${pkg_name}"; then + info "(${pi}/${pc}) Ignoring \"${pkg_name}\"" + continue + fi + info "(${pi}/${pc}) Building \"${pkg_name}\"" if [ $OPT_SKIP_FAIL -eq 1 ]; then @@ -239,7 +245,6 @@ for pkg_name in "${OPT_PACKAGES[@]}"; do fi success "(${pi}/${pc}) Build was successful for \"${pkg_name}\"" - pi=$((pi+1)) done success "Completed all the package builds" diff --git a/mtsc-common/common.sh b/mtsc-common/common.sh index 9c2f804..5e2e548 100755 --- a/mtsc-common/common.sh +++ b/mtsc-common/common.sh @@ -230,3 +230,11 @@ check_pkg_vars() { return 0 } + +# check if a package should be ignored +should_ignore(){ + for i in "${IGNORE[@]}"; do + [ "${i}" == "${1}" ] && return 0 + done + return 1 +}