add comments to script
This commit is contained in:
parent
33379dea49
commit
8f875dec9b
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue