From 0abc6be41d614294542c24ef77629a9c57af94b6 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 18 May 2020 22:55:57 +0300 Subject: [PATCH] kiss: Drop _tar() portability function. Thanks everyone. --- kiss | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/kiss b/kiss index 23710df..1650996 100755 --- a/kiss +++ b/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