2
0
mirror of https://codeberg.org/kiss-community/repo synced 2024-12-21 23:00:06 -07:00

extract: Added support for specifying destination directory for extraction.

This commit is contained in:
Dylan Araps 2019-06-12 21:04:33 +03:00
parent 60feff5f66
commit f9863106c5
2 changed files with 17 additions and 17 deletions

10
puke
View File

@ -36,7 +36,7 @@ pkg_depends() {
}
pkg_sources() {
while read -r src; do
while read -r src _; do
case $(source_type "$src"; echo $?) in
4) git clone "${src##git:}" "$mak_dir" ;;
5) wget -P "$src_dir" "$src" || die "Failed to download $src." ;;
@ -46,7 +46,7 @@ pkg_sources() {
}
pkg_checksum() {
while read -r src; do
while read -r src _; do
case $(source_type "$src"; echo $?) in
2) src_path=$src ;;
3) src_path=$src_dir/${src##*/} ;;
@ -64,13 +64,13 @@ pkg_verify() {
}
pkg_extract() {
while read -r src; do
while read -r src dest; do
case $(source_type "$src"; echo $?)-$src in
2-*) cp -f "$src" "$mak_dir" ;;
3-*.tar*)
tar xf "$src_dir/${src##*/}" -C "$mak_dir" --strip-components 1 ||
die "Couldn't extract ${src##*/}" ;;
tar xf "$src_dir/${src##*/}" -C "$mak_dir/$dest" \
--strip-components 1 || die "Couldn't extract ${src##*/}" ;;
[01]-*) die "${src##*/} not found."
esac

View File

@ -1,24 +1,24 @@
/var/db/puke/zlib/version
/var/db/puke/zlib/sources
/var/db/puke/zlib/checksums
/var/db/puke/zlib/build
/var/db/puke/zlib/checksums
/var/db/puke/zlib/manifest
/var/db/puke/zlib/sources
/var/db/puke/zlib
/var/db/puke
/var/db
/var
/usr/include/zlib.h
/usr/include/zconf.h
/usr/include
/usr/lib/pkgconfig/zlib.pc
/usr/lib/pkgconfig
/usr/lib/libz.a
/usr/lib/libz.so
/usr/lib/libz.so.1
/usr/lib/libz.so.1.2.11
/usr/lib
/usr/share/man/man3/zlib.3
/usr/share/man/man3
/usr/share/man
/usr/share
/usr/lib/pkgconfig/zlib.pc
/usr/lib/pkgconfig
/usr/lib/libz.so.1
/usr/lib/libz.a
/usr/lib/libz.so
/usr/lib/libz.so.1.2.11
/usr/lib
/usr/include/zconf.h
/usr/include/zlib.h
/usr/include
/usr