pkgmeek: delete some unneeded tests

This commit is contained in:
John McQuah 2022-06-01 06:27:29 -04:00
parent 682fc883e5
commit ea0e1fc63e
1 changed files with 3 additions and 3 deletions

View File

@ -77,7 +77,7 @@ rm -rf "$work"; mkdir -p "$work"/{src,pkg} && cd "$work"
}
[ -e "$here" ] || [[ ! $url =~ ^(https|ssh|git)://.*/(.+)\.git ]] || \
( "$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
error "failed to download $here. Check connection and try again."
errDL+=1
@ -143,7 +143,7 @@ for (( u=0; u<${#_local_[@]}; u++ )) ; do
here="${_local_[$u]}"
case "$here" in
*.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/ ;;
esac
@ -255,7 +255,7 @@ parse_options() {
ARGV=( "$@" ) # retain all arguments in case '-r' was not the first
while [ "$1" ]; do
case $1 in
-r|--recursive) recursive "$ARGV" ;;
-r|--recursive) recursive "${ARGV[@]}" ;;
-c|--clean) [ -x "$PRTWASH_COMMAND" ] && PKGMK_CLEAN="yes" || \
{ error "option '-c' not supported ($PRTWASH_COMMAND not installed)";
exit 1; } ;;