add comments to script

This commit is contained in:
Daniel Fichtinger 2025-07-16 17:04:03 -04:00
parent 33379dea49
commit 8f875dec9b

View file

@ -10,14 +10,19 @@
# check if user gave path to a PKGBUILD,
# or a directory that contains it.
# no args; check cwd
if [ "$#" -eq 0 ]; then
input="$PWD"
# otherwise, use arg
else
input="$1"
fi
# if input is a dir, check for PKGBUILD
if [ -d "$input" ]; then
input="$input/PKGBUILD"
fi
# validate; is there a PKGBUILD?
if [ "$(basename "$input")" != "PKGBUILD" ] || [ ! -f "$input" ]; then
echo "PKGBUILD not found!"
exit 1