Skip to content

Commit ae46d28

Browse files
committed
fixup! Standardize downloads with a shared script
1 parent b2767d8 commit ae46d28

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

scripts/download.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ fi
5656

5757
# Download the file if it doesn't exist in the shared downloads directory
5858
if [ ! -f "${SHARED_DOWNLOADS_DIRECTORY}/${filename}" ] ; then
59-
echo "download: Downloading ${filename} from ${downloadUrl}"
59+
echo "download: Downloading ${filename} from ${downloadUrl} into ${SHARED_DOWNLOADS_DIRECTORY}"
6060

6161
# Download the file
6262
if ! curl -L --fail-with-body -o "${SHARED_DOWNLOADS_DIRECTORY}/${filename}" "${downloadUrl}"; then

scripts/downloadMavenArtifact.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# Overrideable constants
1414
ARTIFACTS_DIRECTORY=${ARTIFACTS_DIRECTORY:-"artifacts"}
1515
SHARED_DOWNLOADS_DIRECTORY="${SHARED_DOWNLOADS_DIRECTORY:-$(dirname "$( pwd )")/downloads}"
16+
echo "downloadMavenArtifact: SHARED_DOWNLOADS_DIRECTORY=${SHARED_DOWNLOADS_DIRECTORY}" # TODO deactivate, only for debugging
1617

1718
# Default and initial values for command line options
1819
groupId=""
@@ -58,7 +59,7 @@ fi
5859
# CDPATH reduces the scope of the cd command to potentially prevent unintended directory changes.
5960
# This way non-standard tools like readlink aren't needed.
6061
SCRIPTS_DIR=${SCRIPTS_DIR:-$( CDPATH=. cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P )}
61-
#echo "downloadMavenArtifact: SCRIPTS_DIR=$SCRIPTS_DIR"
62+
echo "downloadMavenArtifact: SCRIPTS_DIR=$SCRIPTS_DIR" # TODO deactivate, only for debugging
6263

6364
# Internal constants
6465
BASE_URL="https://repo1.maven.org/maven2"

scripts/downloader/downloadAxonFramework.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ echo "download${ANALYSIS_NAME}: ARTIFACTS_VERSION=${ARTIFACTS_VERSION}"
3232
# Even if $BASH_SOURCE is made for Bourne-like shells it is also supported by others and therefore here the preferred solution.
3333
# CDPATH reduces the scope of the cd command to potentially prevent unintended directory changes.
3434
# This way non-standard tools like readlink aren't needed.
35-
ANALYSIS_SCRIPT_DIR=${ANALYSIS_SCRIPT_DIR:-$( CDPATH=. cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P )}
36-
echo "download${ANALYSIS_NAME}: ANALYSIS_SCRIPT_DIR=${ANALYSIS_SCRIPT_DIR}"
35+
DOWNLOADER_SCRIPTS_DIR=${DOWNLOADER_SCRIPTS_DIR:-$( CDPATH=. cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P )}
36+
echo "download${ANALYSIS_NAME}: DOWNLOADER_SCRIPTS_DIR=${DOWNLOADER_SCRIPTS_DIR}"
3737

3838
# Get the "scripts" directory by taking the path of this script and going one directory up.
39-
SCRIPTS_DIR=${SCRIPTS_DIR:-$(dirname -- "${ANALYSIS_SCRIPT_DIR}")}
39+
SCRIPTS_DIR=${SCRIPTS_DIR:-$(dirname -- "${DOWNLOADER_SCRIPTS_DIR}")}
4040
echo "download${ANALYSIS_NAME}: SCRIPTS_DIR=${SCRIPTS_DIR}"
4141

4242
################################################################

0 commit comments

Comments
 (0)