Commit 0d56bdcc authored by Roque's avatar Roque

[1.1.5] Increase ebulk version for package release

-help file updated
-some cleanup in ebulk script:
 - sanitize data-lake-url
 - rename variables
parent d8d8e20b
#! /usr/bin/env bash
DATA_LAKE_URL='https://wendelin.io/'
DEFAULT_DATA_LAKE_URL='https://wendelin.io/'
DOWN_URL="$DATA_LAKE_URL/"
DOWN_URL="$DEFAULT_DATA_LAKE_URL"
ING_POLICY="portal_ingestion_policies/default_ebulk"
ING_URL="$DATA_LAKE_URL$ING_POLICY"
ING_URL="$DEFAULT_DATA_LAKE_URL$ING_POLICY"
EBULK_VERSION="1.1.3"
EBULK_VERSION="1.1.5"
EMBULK_VERSION="0.9.7"
EBULK_DATA_PATH=~/.ebulk
EBULK_DATASET_FILE_NAME="/.ebulk_dataset"
......@@ -49,7 +49,7 @@ ASK="A"
if [ -f "$DATA_LAKE_URL_FILE" ]; then
URL=$(cat "$DATA_LAKE_URL_FILE" 2>/dev/null)
if [[ "$URL" != "" ]]; then
DOWN_URL="$URL/"
DOWN_URL="$URL"
ING_URL="$URL$ING_POLICY"
fi
fi
......@@ -221,6 +221,9 @@ function setDataLakeUrl {
echo -e "[INFO] Please enter a valid url.${NC}"
echo >&2; return 1
fi
if [ "${URL: -1}" != "/" ] ; then
URL="$URL/"
fi
echo "$URL" > "$DATA_LAKE_URL_FILE" 2>/dev/null
rm -f ${CREDENTIALS_FILE}
echo
......@@ -229,11 +232,11 @@ function setDataLakeUrl {
function defaultDataLakeUrl {
echo "" > "$DATA_LAKE_URL_FILE" 2>/dev/null
DOWN_URL="$DATA_LAKE_URL/"
ING_URL="$DATA_LAKE_URL$ING_POLICY"
DOWN_URL="$DEFAULT_DATA_LAKE_URL"
ING_URL="$DEFAULT_DATA_LAKE_URL$ING_POLICY"
rm -f ${CREDENTIALS_FILE}
echo
echo "[INFO] Data-lake url set to default '$DATA_LAKE_URL'"
echo "[INFO] Data-lake url set to default '$DEFAULT_DATA_LAKE_URL'"
}
function updateConfigFile {
......
......@@ -16,6 +16,7 @@ commands:
-h, --help Tool help
-r, --readme Opens README file
-e, --examples Shows some tool usage examples
-v, --version Ebulk tool version
store-credentials Stores user and password for automatic authentication
set-data-lake-url Sets the data lake url where to ingest/download
default-data-lake-url Sets the data lake url to default
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment