diff --git a/scripts/pkgmeek b/scripts/pkgmeek index e4b519f..edc8b42 100755 --- a/scripts/pkgmeek +++ b/scripts/pkgmeek @@ -142,12 +142,11 @@ esac; } if [ "$pkg_utd" = 0 ] || [ "$PKGMK_FORCE" = "yes" ]; then 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|*.7z|*.zip|*.rpm) - bsdtar -p -o -C src -xf "$here" || errUZ+=1 ;; - *) - cp -r -L "$here" src/ ;; - esac + if do_unpack "$here"; then + bsdtar -p -o -C src -xf "$here" || errUZ+=1 + else + cp -r -L "$here" src/ + fi done [ $errUZ = 0 ] && info "Sources successfully unpacked." || \ @@ -414,6 +413,12 @@ fetch_url() { fi } +do_unpack() { + [[ " ${nounpack[*]} " =~ " $(basename $1) " ]] && return 1 + [[ "$1" =~ \.(tar|tar.gz|tar.Z|tgz|tar.bz2|tbz2|tar.xz|txz|tar.lzma|tar.lz|7z|zip|rpm)$ ]] && return 0 + return 1 +} + cat_footprint() { pkginfo --footprint "$pkg_dir$package" \ | sed "s|\tlib/modules/$(uname -r)/|\tlib/modules//|g" \