27 lines
545 B
Bash
27 lines
545 B
Bash
#!/usr/bin/bash
|
|
|
|
ALHP_SCRIPT='/usr/local/bin/alhp-check.sh'
|
|
building_pkgs=()
|
|
|
|
if [[ $# -gt 0 ]]; then
|
|
for pkg in $@; do
|
|
result=$($ALHP_SCRIPT --check-pkg $pkg -j)
|
|
if [[ $result != [] ]]; then
|
|
building_pkgs+=($pkg)
|
|
fi
|
|
done
|
|
else
|
|
mapfile -t building_pkgs < <($ALHP_SCRIPT)
|
|
fi
|
|
|
|
if (( ${#building_pkgs[@]} > 0 )); then
|
|
echo "WARNING: The following packages are currently building or queued on ALHP:"
|
|
for p in ${building_pkgs[@]}; do
|
|
echo " - $p"
|
|
done
|
|
# Uncomment to abort pacman transaction
|
|
# exit 1
|
|
fi
|
|
|
|
exit 0
|