29 lines
652 B
Bash
29 lines
652 B
Bash
#!/usr/bin/bash
|
|
|
|
ALHP_SCRIPT="/usr/local/bin/alhp-check.sh"
|
|
building_pkgs=()
|
|
|
|
if [[ $# -gt 0 ]]; then
|
|
# Check only specified packages (for install hook)
|
|
for pkg in "$@"; do
|
|
result=$($ALHP_SCRIPT --check-pkg "$pkg" -j)
|
|
if [[ "$result" != "[]" ]]; then
|
|
building_pkgs+=("$pkg")
|
|
fi
|
|
done
|
|
else
|
|
# No args: full scan (for upgrade hook)
|
|
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
|