mirror of
https://codeberg.org/kiss-community/kiss
synced 2025-01-26 09:34:59 -07:00
kiss: new naming scheme for tarballs
This commit is contained in:
parent
117605b88a
commit
dd4204d6e2
14
kiss
14
kiss
@ -170,13 +170,17 @@ pkg_list() {
|
||||
|
||||
pkg_cache() {
|
||||
# Find the tarball of a package using a glob. Use the first found match
|
||||
# of '<pkg_name>#<pkg_version><pkg_release>.tar.*'.
|
||||
# of '<pkg_name>[#@]<pkg_version><pkg_release>.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
|
||||
|
Loading…
Reference in New Issue
Block a user