summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Ball <nullspoon@oper.io>2017-06-23 10:16:40 -0600
committerAaron Ball <nullspoon@oper.io>2017-06-23 10:16:40 -0600
commit8259998b09a877de72d0f704ad90212cb08b278f (patch)
tree933efba863bae39a0bc33c6b0d69b3906aa9f7d4
parentb1721a4a217379be0cff125fc75ef8c9b69ab969 (diff)
parent3c611f6993fd7ac716dc99860df9af7abafde616 (diff)
downloadportimg-8259998b09a877de72d0f704ad90212cb08b278f.tar.gz
portimg-8259998b09a877de72d0f704ad90212cb08b278f.tar.xz
Merge branch 'skip-redownload'
-rw-r--r--lib/pkg.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/pkg.sh b/lib/pkg.sh
index 86278b3..2a5047a 100644
--- a/lib/pkg.sh
+++ b/lib/pkg.sh
@@ -32,12 +32,16 @@ function pkg_download_src {
# Download from Pkgfile src spec
for file in ${_src[@]}; do
- # If the source file exists locally, just copy from here
if [[ -f ${file} ]]; then
+ # If the source file exists locally, just copy from here
cp -p ${file} ${_pkgsrc}
else
- linfo "Downloading ${file}"
- download_src ${file} ${_port}
+ if [ -f $(basename ${file}) ]; then
+ linfo "Source '${file}' already downloaded"
+ else
+ linfo "Downloading ${file}"
+ download_src ${file} ${_port}
+ fi
linfo "Extracting $(basename ${file}) to ${_pkgsrc}"
archive_extract ${_port}/$(basename ${file}) ${_pkgsrc}
fi

Generated by cgit