pkgmeek: add support for nounpack array
This commit is contained in:
parent
b5b9a34a70
commit
773282ba51
@ -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/<kernel-version>/|g" \
|
||||
|
Loading…
Reference in New Issue
Block a user