Commit 34ccf56f authored by Roque's avatar Roque

fix reference check issue with paths

parent df5b2c4a
...@@ -93,18 +93,20 @@ function checkParameters { ...@@ -93,18 +93,20 @@ function checkParameters {
fi fi
fi fi
EBULK_DATASET_FILE="$DATASET_DIR$EBULK_DATASET_FILE_NAME" EBULK_DATASET_FILE="$DATASET_DIR$EBULK_DATASET_FILE_NAME"
if ! [[ $REFERENCE =~ $re ]] ; then if [ "$ALWAYS_YES" = "true" ] ; then
if [ "$REFERENCE" = "." ] && [[ -z "$STORAGE" ]] ; then if ! [[ $REFERENCE =~ $re ]] ; then
echo if [ "$REFERENCE" = "." ] && [[ -z "$STORAGE" ]] ; then
echo -e "${ORANGE}[ERROR] You are not in a dataset directory ${GREEN}'$REFERENCE'${ORANGE}.${NC}" echo
echo echo -e "${ORANGE}[ERROR] You are not in a dataset directory ${GREEN}'$REFERENCE'${ORANGE}.${NC}"
else echo
echo else
echo -e "${ORANGE}[ERROR] Error in argument: invalid dataset name ${GREEN}'$REFERENCE'${ORANGE}.${NC}" echo
echo -e "${ORANGE}[ERROR] Only alphanumerics, dots ( . ), underscores ( _ ) and hyphens ( - ) are allowed.${NC}" echo -e "${ORANGE}[ERROR] Error in argument: invalid dataset name ${GREEN}'$REFERENCE'${ORANGE}.${NC}"
echo echo -e "${ORANGE}[ERROR] Only alphanumerics, dots ( . ), underscores ( _ ) and hyphens ( - ) are allowed.${NC}"
echo
fi
helpReadme >&2; return 1
fi fi
helpReadme >&2; return 1
fi fi
if [[ $DATASET_DIR != $REFERENCE ]]; then if [[ $DATASET_DIR != $REFERENCE ]]; then
if [ "$REFERENCE" = "." ] ; then if [ "$REFERENCE" = "." ] ; then
...@@ -697,7 +699,7 @@ while [ "$1" != "" ]; do ...@@ -697,7 +699,7 @@ while [ "$1" != "" ]; do
shift shift
done done
for ELEMENT in '' '-d' '--directory' '-s' '--storage' '-cs' '--custom-storage' '-a' '--advanced' '-c' '--chunk' '-bs' '--batch-size' '-dc' '--discard-changes' '-dd' '--set-description'; do for ELEMENT in '' '-d' '--directory' '-s' '--storage' '-cs' '--custom-storage' '-a' '--advanced' '-c' '--chunk' '-bs' '--batch-size' '-y' '--yes' '-dc' '--discard-changes' '-dd' '--set-description'; do
if [ "$ELEMENT" = "$REFERENCE" ]; then if [ "$ELEMENT" = "$REFERENCE" ]; then
REFERENCE="." REFERENCE="."
fi fi
......
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