forked from kiss-community/kiss
kiss: Drop _tar() portability function. Thanks everyone.
This commit is contained in:
parent
d4e6e14324
commit
0abc6be41d
18
kiss
18
kiss
@ -64,16 +64,6 @@ as_root() {
|
||||
esac
|
||||
}
|
||||
|
||||
_tar() {
|
||||
# Some tar implementations support '-args' and some
|
||||
# simply support 'args'. This will try '-args' and
|
||||
# fallback to 'args'.
|
||||
tar_cmd=$1
|
||||
shift
|
||||
|
||||
tar "-$tar_cmd" "$@" || tar "$tar_cmd" "$@"
|
||||
}
|
||||
|
||||
run_hook() {
|
||||
# Provide a default post-build hook to remove files
|
||||
# and directories for things we don't support out of
|
||||
@ -325,10 +315,10 @@ pkg_extract() {
|
||||
*://*.tar|*://*.tar.??|*://*.tar.???|*://*.tar.????|*://*.t?z)
|
||||
decompress "$src_dir/$1/${src##*/}" > .ktar
|
||||
|
||||
_tar xf .ktar ||
|
||||
tar xf .ktar ||
|
||||
die "$1" "Couldn't extract ${src##*/}"
|
||||
|
||||
_tar tf .ktar | while IFS=/ read -r dir _; do
|
||||
tar tf .ktar | while IFS=/ read -r dir _; do
|
||||
# Some tarballs contain './' as the top-level directory,
|
||||
# we need to skip these occurances.
|
||||
[ -d "${dir#.}" ] || continue
|
||||
@ -609,7 +599,7 @@ pkg_tar() (
|
||||
cd "$pkg_dir/$1"
|
||||
|
||||
# Create a tarball from the contents of the built package.
|
||||
_tar cf - . | case ${KISS_COMPRESS:=gz} in
|
||||
tar cf - . | case ${KISS_COMPRESS:=gz} in
|
||||
bz2) bzip2 -z ;;
|
||||
gz) gzip -6 ;;
|
||||
lzma) lzma -z ;;
|
||||
@ -1195,7 +1185,7 @@ pkg_install() {
|
||||
(
|
||||
cd "$tar_dir/$pkg_name"
|
||||
|
||||
decompress "$tar_file" | _tar xf -
|
||||
decompress "$tar_file" | tar xf -
|
||||
)
|
||||
|
||||
# Naively assume that the existence of a manifest file is all
|
||||
|
Loading…
Reference in New Issue
Block a user