mirror of
https://github.com/thetechprepper/emcomm-tools-os-community.git
synced 2026-09-17 15:41:44 -04:00
Post R5 Build 4 fixes - Added support for retry asset downloader
This commit is contained in:
@@ -7,6 +7,7 @@ trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
|
||||
trap 'et-log "\"${last_command}\" command failed with exit code $?."' ERR
|
||||
|
||||
. ./env.sh
|
||||
. ../overlay/opt/emcomm-tools/bin/et-common
|
||||
|
||||
APP=et-api
|
||||
VERSION=1.0.0
|
||||
@@ -24,17 +25,23 @@ mkdir -v -p "${BIN_DIR}" "${DATA_DIR}" "${INDEX_DIR}"
|
||||
|
||||
# Download and install et-api uber JAR
|
||||
URL="${BASE_URL}/${ET_API_JAR}"
|
||||
et-log "Downloading ${APP}: ${URL}"
|
||||
curl -s -L -o "${BIN_DIR}/${APP}" --fail ${URL}
|
||||
download_with_retries ${URL} ${APP}
|
||||
mv ${APP} ${BIN_DIR}
|
||||
chmod 755 "${BIN_DIR}/${APP}"
|
||||
|
||||
# Download pre-built data sets
|
||||
FILES=("faa.csv" "license.csv" "zip2geo.csv" "zip2geo-elevation.csv")
|
||||
FILES=(
|
||||
"faa.csv"
|
||||
"license.csv"
|
||||
"zip2geo.csv"
|
||||
"zip2geo-elevation.csv"
|
||||
)
|
||||
for file in "${FILES[@]}"; do
|
||||
URL="${BASE_URL}/${file}"
|
||||
|
||||
et-log "Downloading data set: ${URL}"
|
||||
curl -s -L -o "${DATA_DIR}/${file}" --fail ${URL}
|
||||
download_with_retries ${URL} ${file}
|
||||
mv ${file} ${DATA_DIR}
|
||||
done
|
||||
|
||||
et-log "Applying permissions..."
|
||||
|
||||
Reference in New Issue
Block a user