summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Ball <nullspoon@oper.io>2017-06-23 08:48:33 -0600
committerAaron Ball <nullspoon@oper.io>2017-06-23 08:48:33 -0600
commit6d14dee44a6809332cf3fcdc08de254ee89830eb (patch)
treeb33f93af4ea742a93899dced26b443dbaac87585
parent5fc33467ee249290799fff1178e9ee512735db87 (diff)
parent186b88bac21b0001da2e7a5717dff1736027d69a (diff)
downloadportimg-6d14dee44a6809332cf3fcdc08de254ee89830eb.tar.gz
portimg-6d14dee44a6809332cf3fcdc08de254ee89830eb.tar.xz
Merge branch 'pkgmk-dl-path'
-rw-r--r--lib/pkg.sh17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/pkg.sh b/lib/pkg.sh
index 9c1a5df..4b17b27 100644
--- a/lib/pkg.sh
+++ b/lib/pkg.sh
@@ -25,20 +25,21 @@ export PORTSDIR=${PORTSDIR:-/usr/ports} # Path to port store
export PORTTMP='' # Path to the port temp dir
function pkg_download_src {
- local pkgsrc=${1}
- shift
- local src=${@}
+ local _port=${1:-}
+ local _pkgsrc=${2:-}
+ shift && shift
+ local _src=${@}
# Download from Pkgfile src spec
- for file in ${src[@]}; do
+ for file in ${_src[@]}; do
# If the source file exists locally, just copy from here
if [[ -f ${file} ]]; then
- cp -p ${file} ${pkgsrc}
+ cp -p ${file} ${_pkgsrc}
else
linfo "Downloading ${file}"
- download_src ${file} ${pkgsrc}
- linfo "Extracting $(basename ${file}) to ${pkgsrc}"
- archive_extract ${pkgsrc}/$(basename ${file}) ${pkgsrc}
+ download_src ${file} ${_port}
+ linfo "Extracting $(basename ${file}) to ${_pkgsrc}"
+ archive_extract ${_port}/$(basename ${file}) ${_pkgsrc}
fi
done
}

Generated by cgit