diff options
author | Aaron Ball <nullspoon@oper.io> | 2017-06-23 08:48:33 -0600 |
---|---|---|
committer | Aaron Ball <nullspoon@oper.io> | 2017-06-23 08:48:33 -0600 |
commit | 6d14dee44a6809332cf3fcdc08de254ee89830eb (patch) | |
tree | b33f93af4ea742a93899dced26b443dbaac87585 | |
parent | 5fc33467ee249290799fff1178e9ee512735db87 (diff) | |
parent | 186b88bac21b0001da2e7a5717dff1736027d69a (diff) | |
download | portimg-6d14dee44a6809332cf3fcdc08de254ee89830eb.tar.gz portimg-6d14dee44a6809332cf3fcdc08de254ee89830eb.tar.xz |
Merge branch 'pkgmk-dl-path'
-rw-r--r-- | lib/pkg.sh | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -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 } |