aboutsummaryrefslogtreecommitdiff
path: root/kiss
diff options
context:
space:
mode:
Diffstat (limited to 'kiss')
-rwxr-xr-xkiss39
1 files changed, 22 insertions, 17 deletions
diff --git a/kiss b/kiss
index 91935b9..e4c4a3f 100755
--- a/kiss
+++ b/kiss
@@ -173,24 +173,29 @@ pkg_extract() {
while read -r src dest; do
mkdir -p "$mak_dir/$1/$dest" && cd "$mak_dir/$1/$dest"
- # Only 'tar' archives are currently supported for extraction.
- # Any other file-types are simply copied to '$mak_dir' which
- # allows for manual extraction.
- if [ -z "${src##*.tar*}" ] || [ -z "${src##*.tgz}" ]; then
- tar xf "$src_dir/$1/${src##*/}" --strip-components 1 \
- || die "$1" "Couldn't extract ${src##*/}"
-
- # Local file.
- elif [ -f "$repo_dir/$src" ]; then
- cp -f "$repo_dir/$src" .
+ case $src in
+ # Only 'tar' archives are currently supported for extraction.
+ # Any other file-types are simply copied to '$mak_dir' which
+ # allows for manual extraction.
+ *://*.tar|*://*.tar.??|*://*.tar.???|*://*.tar.????|*://*.tgz)
+ tar xf "$src_dir/$1/${src##*/}" --strip-components 1 ||
+ die "$1" "Couldn't extract ${src##*/}"
+ ;;
- # Remote file.
- elif [ -f "$src_dir/$1/${src##*/}" ]; then
- cp -f "$src_dir/$1/${src##*/}" .
+ *)
+ # Local file.
+ if [ -f "$repo_dir/$src" ]; then
+ cp -f "$repo_dir/$src" .
- else
- die "$1" "Local file $src not found"
- fi
+ # Remote file.
+ elif [ -f "$src_dir/$1/${src##*/}" ]; then
+ cp -f "$src_dir/$1/${src##*/}" .
+
+ else
+ die "$1" "Local file $src not found"
+ fi
+ ;;
+ esac
done < "$repo_dir/sources"
}
@@ -1019,7 +1024,7 @@ args() {
;;
v|version|-v|--version)
- log kiss 0.53.1
+ log kiss 0.53.2
;;
h|help|-h|--help|'')