moved files to files for better overview
This commit is contained in:
28
scripts/alhp-pacman-hook.sh
Normal file
28
scripts/alhp-pacman-hook.sh
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/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
|
Reference in New Issue
Block a user