1
0
mirror of https://codeberg.org/kiss-community/kiss synced 2024-11-04 14:05:41 -07:00

kiss: fixes for cache change. Related to #196

This commit is contained in:
Dylan Araps 2020-10-23 14:41:06 +03:00
parent 5bbe895731
commit eb2eef852c
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

12
kiss
View File

@ -333,7 +333,7 @@ pkg_extract() {
;; ;;
*://*.tar|*://*.tar.??|*://*.tar.???|*://*.tar.????|*://*.t?z) *://*.tar|*://*.tar.??|*://*.tar.???|*://*.tar.????|*://*.t?z)
decompress "$src_dir/$1/${src##*/}" \ decompress "$src_dir/$1/${dest:-.}/${src##*/}" \
> "$tmp_dir/.tar" > "$tmp_dir/.tar"
tar xf "$tmp_dir/.tar" || tar xf "$tmp_dir/.tar" ||
@ -374,7 +374,7 @@ pkg_extract() {
;; ;;
*://*.zip) *://*.zip)
unzip "$src_dir/$1/${src##*/}" || unzip "$src_dir/$1/${dest:-.}/${src##*/}" ||
die "$1" "failed to extract ${src##*/}" die "$1" "failed to extract ${src##*/}"
;; ;;
@ -395,13 +395,9 @@ pkg_extract() {
elif [ -f "/$src" ]; then elif [ -f "/$src" ]; then
cp -f "/$src" . cp -f "/$src" .
# Remote file + dest.
elif [ -f "$src_dir/$1/$dest/${src##*/}" ]; then
cp -f "$src_dir/$1/$dest/${src##*/}" .
# Remote file. # Remote file.
elif [ -f "$src_dir/$1/${src##*/}" ]; then elif [ -f "$src_dir/$1/${dest:-.}/${src##*/}" ]; then
cp -f "$src_dir/$1/${src##*/}" . cp -f "$src_dir/$1/${dest:-.}/${src##*/}" .
else else
die "$1" "file $src not found" die "$1" "file $src not found"