diff --git a/scripts/pkgmeek b/scripts/pkgmeek index a5b129a..c77923e 100755 --- a/scripts/pkgmeek +++ b/scripts/pkgmeek @@ -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; } ;;