diff options
-rw-r--r-- | lib/pkg.sh | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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 |