aboutsummaryrefslogtreecommitdiff
path: root/kiss
diff options
context:
space:
mode:
authordylan.araps@gmail.com <dylan.araps@gmail.com>2019-09-10 08:20:04 +0000
committerdylan.araps@gmail.com <dylan.araps@gmail.com>2019-09-10 08:20:04 +0000
commit0802ce5717291364f0dc971b30298d4779dc4721 (patch)
tree84fd47133a2d83b1e032dfc6ba19c5ecdff3a893 /kiss
parent1bc2180e19607c68c3c8ce64228517530ee163f4 (diff)
downloadcpt-0802ce5717291364f0dc971b30298d4779dc4721.tar.gz
kiss cleanup
FossilOrigin-Name: 207145ac66416875353421cf7050fe57535102057b11d6c158e76e65bafa0cf7
Diffstat (limited to 'kiss')
-rwxr-xr-xkiss14
1 files changed, 4 insertions, 10 deletions
diff --git a/kiss b/kiss
index cb2ea32..898e68f 100755
--- a/kiss
+++ b/kiss
@@ -149,33 +149,27 @@ pkg_extract() {
# any local repository files.
log "[$1] Extracting sources"
- # Store each downloaded source in named after the package it
- # belongs to. This avoid conflicts between two packages having a
- # source of the same name.
- mkdir -p "$mak_dir/$1" && cd "$mak_dir/$1"
-
repo_dir=$(pkg_find "$1")
while read -r src dest; do
- mkdir -p "./$dest"
+ mkdir -p "$mak_dir/$1/$dest" && cd "$mak_dir/$1/$dest"
case $src in
# Only 'tar' archives are currently supported for extraction.
# Any other file-types are simply copied to '$mak_dir' which
# allows you to extract them manually.
*://*.tar*|*://*.tgz)
- tar xf "$src_dir/$1/${src##*/}" -C "./$dest" \
- --strip-components 1 \
+ tar xf "$src_dir/$1/${src##*/}" --strip-components 1 \
|| die "[$1] Couldn't extract ${src##*/}"
;;
# Local files (Any non-remote source is assumed to be local).
*)
if [ -f "$repo_dir/$src" ]; then
- cp -f "$repo_dir/$src" "./$dest"
+ cp -f "$repo_dir/$src" .
elif [ -f "$src_dir/$1/${src##*/}" ]; then
- cp -f "$src_dir/$1/${src##*/}" "./$dest"
+ cp -f "$src_dir/$1/${src##*/}" .
else
die "[$1] Local file $src not found"