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,
|
# check if user gave path to a PKGBUILD,
|
||||||
# or a directory that contains it.
|
# or a directory that contains it.
|
||||||
|
|
||||||
|
# no args; check cwd
|
||||||
if [ "$#" -eq 0 ]; then
|
if [ "$#" -eq 0 ]; then
|
||||||
input="$PWD"
|
input="$PWD"
|
||||||
|
# otherwise, use arg
|
||||||
else
|
else
|
||||||
input="$1"
|
input="$1"
|
||||||
fi
|
fi
|
||||||
|
# if input is a dir, check for PKGBUILD
|
||||||
if [ -d "$input" ]; then
|
if [ -d "$input" ]; then
|
||||||
input="$input/PKGBUILD"
|
input="$input/PKGBUILD"
|
||||||
fi
|
fi
|
||||||
|
# validate; is there a PKGBUILD?
|
||||||
if [ "$(basename "$input")" != "PKGBUILD" ] || [ ! -f "$input" ]; then
|
if [ "$(basename "$input")" != "PKGBUILD" ] || [ ! -f "$input" ]; then
|
||||||
echo "PKGBUILD not found!"
|
echo "PKGBUILD not found!"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue