pkgmeek: delete some unneeded tests

This commit is contained in:
John McQuah 2022-06-01 06:27:29 -04:00
parent 682fc883e5
commit ea0e1fc63e

View File

@ -77,7 +77,7 @@ rm -rf "$work"; mkdir -p "$work"/{src,pkg} && cd "$work"
} }
[ -e "$here" ] || [[ ! $url =~ ^(https|ssh|git)://.*/(.+)\.git ]] || \ [ -e "$here" ] || [[ ! $url =~ ^(https|ssh|git)://.*/(.+)\.git ]] || \
( "$PKGMK_GIT_COMMAND" clone "$url" "$here" ) || continue ( "$PKGMK_GIT_COMMAND" clone "$url" "$here" ) || continue
# but if not, exit with an informative error message # but if not, exit with an informative error message
if [ ! -e "$here" ]; then if [ ! -e "$here" ]; then
error "failed to download $here. Check connection and try again." error "failed to download $here. Check connection and try again."
errDL+=1 errDL+=1
@ -143,7 +143,7 @@ for (( u=0; u<${#_local_[@]}; u++ )) ; do
here="${_local_[$u]}" here="${_local_[$u]}"
case "$here" in case "$here" in
*.tar|*.tar.gz|*.tar.Z|*.tgz|*.tar.bz2|*.tbz2|*.tar.xz|*.txz|*.tar.lzma|*.tar.lz|*.zip|*.rpm) *.tar|*.tar.gz|*.tar.Z|*.tgz|*.tar.bz2|*.tbz2|*.tar.xz|*.txz|*.tar.lzma|*.tar.lz|*.zip|*.rpm)
[ -d "$here" ] || bsdtar -p -o -C src -xf "$here" || errUZ+=1 ;; bsdtar -p -o -C src -xf "$here" || errUZ+=1 ;;
*) *)
cp -r "$here" src/ ;; cp -r "$here" src/ ;;
esac esac
@ -255,7 +255,7 @@ parse_options() {
ARGV=( "$@" ) # retain all arguments in case '-r' was not the first ARGV=( "$@" ) # retain all arguments in case '-r' was not the first
while [ "$1" ]; do while [ "$1" ]; do
case $1 in case $1 in
-r|--recursive) recursive "$ARGV" ;; -r|--recursive) recursive "${ARGV[@]}" ;;
-c|--clean) [ -x "$PRTWASH_COMMAND" ] && PKGMK_CLEAN="yes" || \ -c|--clean) [ -x "$PRTWASH_COMMAND" ] && PKGMK_CLEAN="yes" || \
{ error "option '-c' not supported ($PRTWASH_COMMAND not installed)"; { error "option '-c' not supported ($PRTWASH_COMMAND not installed)";
exit 1; } ;; exit 1; } ;;