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
|
if [ "$pkg_utd" = 0 ] || [ "$PKGMK_FORCE" = "yes" ]; then
|
||||||
for (( u=0; u<${#_local_[@]}; u++ )) ; do
|
for (( u=0; u<${#_local_[@]}; u++ )) ; do
|
||||||
here="${_local_[$u]}"
|
here="${_local_[$u]}"
|
||||||
case "$here" in
|
if do_unpack "$here"; then
|
||||||
*.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
|
||||||
bsdtar -p -o -C src -xf "$here" || errUZ+=1 ;;
|
else
|
||||||
*)
|
cp -r -L "$here" src/
|
||||||
cp -r -L "$here" src/ ;;
|
fi
|
||||||
esac
|
|
||||||
done
|
done
|
||||||
|
|
||||||
[ $errUZ = 0 ] && info "Sources successfully unpacked." || \
|
[ $errUZ = 0 ] && info "Sources successfully unpacked." || \
|
||||||
@ -414,6 +413,12 @@ fetch_url() {
|
|||||||
fi
|
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() {
|
cat_footprint() {
|
||||||
pkginfo --footprint "$pkg_dir$package" \
|
pkginfo --footprint "$pkg_dir$package" \
|
||||||
| sed "s|\tlib/modules/$(uname -r)/|\tlib/modules/<kernel-version>/|g" \
|
| sed "s|\tlib/modules/$(uname -r)/|\tlib/modules/<kernel-version>/|g" \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user