From 8f875dec9bd4744f7a12b72bf5dc042a36c2f838 Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Wed, 16 Jul 2025 17:04:03 -0400 Subject: [PATCH] add comments to script --- update-integrity.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/update-integrity.sh b/update-integrity.sh index 7e1e0ef..0bd9e93 100755 --- a/update-integrity.sh +++ b/update-integrity.sh @@ -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