Skip to content

Commit c3a31f5

Browse files
author
Damian Rouson
committed
Fix download_if_necessary.sh oversight of tar ball
This commit fixes a regression that precluded recognizing a previously downloaded tar ball so that packages were being downloaded even if the corresponding source tar ball already existed in the default download path.
1 parent 4cf2b88 commit c3a31f5

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

prerequisites/build-functions/download_if_necessary.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# shellcheck source=./ftp-url.sh
2-
source "${OPENCOARRAYS_SRC_DIR:-}/prerequisites/build-functions/ftp-url.sh"
2+
source "${opencoarrays_src_dir}/prerequisites/build-functions/ftp-url.sh"
33
# shellcheck source=./set_SUDO_if_needed_to_write_to_directory.sh
4-
source "${OPENCOARRAYS_SRC_DIR:-}/prerequisites/build-functions/set_SUDO_if_needed_to_write_to_directory.sh"
4+
source "${opencoarrays_src_dir}/prerequisites/build-functions/set_SUDO_if_needed_to_write_to_directory.sh"
55

66
# Download pkg-config if the tar ball is not already in the present working directory
77
# shellcheck disable=SC2154
88
download_if_necessary()
99
{
10-
download_path="${PWD}/downloads"
10+
download_path="${opencoarrays_src_dir}/prerequisites/downloads"
1111
set_SUDO_if_needed_to_write_to_directory "${download_path}"
12-
if [ -f "$url_tail" ] || [ -d "$url_tail" ]; then
13-
info "Found '${url_tail}' in ${PWD}."
12+
if [[ -f "${download_path}/${url_tail}" || -d "${download_path}/${url_tail}" ]] ; then
13+
info "Found '${url_tail}' in ${download_path}."
1414
info "If it resulted from an incomplete download, building ${package_name} could fail."
1515
info "Would you like to proceed anyway? (Y/n)"
1616
read -r proceed

0 commit comments

Comments
 (0)