new: implement pool IGNORE option to mp-pool
This commit is contained in:
parent
98bb94bec1
commit
7b7b386dab
@ -78,17 +78,24 @@ fi
|
||||
# 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
|
||||
@ -97,7 +104,6 @@ for pkg in "${srcpath}/"*; do
|
||||
files+=("${NAME}_${VERSION}.mpf.sig")
|
||||
|
||||
clean_pkg_vars
|
||||
pi=$((pi+1))
|
||||
done
|
||||
|
||||
success "Completed"
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user