From dd4204d6e227ae406c330845ec2c1e3913093d0b Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 6 Nov 2020 08:34:36 +0200 Subject: [PATCH] kiss: new naming scheme for tarballs --- kiss | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/kiss b/kiss index 5544bd4..8c2440b 100755 --- a/kiss +++ b/kiss @@ -170,13 +170,17 @@ pkg_list() { pkg_cache() { # Find the tarball of a package using a glob. Use the first found match - # of '#.tar.*'. + # of '[#@].tar.*'. read -r version release 2>/dev/null < "$(pkg_find "$1")/version" - set +f; set -f -- "$bin_dir/$1#$version-$release.tar."* + set +f + set -f -- "$bin_dir/$1"[#@]"$version-$release.tar."* + + [ -f "$2" ] && shift + tar_file=$1 - [ -f "$tar_file" ] + [ -f "$1" ] } pkg_sources() { @@ -547,7 +551,7 @@ pkg_tar() ( lz) lzip -z ;; xz) xz -zT 0 ;; zst) zstd -z ;; - esac > "$bin_dir/$1#$version-$release.tar.${KISS_COMPRESS:=gz}" + esac > "$bin_dir/$1@$version-$release.tar.${KISS_COMPRESS:=gz}" log "$1" "Successfully created tarball" run_hook post-package "$1" @@ -1144,7 +1148,7 @@ pkg_install() { # Install can also take the full path to a tarball. We don't need to check # the repository if this is the case. if [ -f "$1" ] && [ -z "${1%%*.tar.*}" ]; then - tar_file=$1 pkg_name=${1##*/} pkg_name=${pkg_name%#*} + tar_file=$1 pkg_name=${1##*/} pkg_name=${pkg_name%[#@]*} elif pkg_cache "$1" 2>/dev/null; then pkg_name=$1