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
1 changed files with 4 additions and 8 deletions

12
kiss
View File

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