directory cleanup for tests
This commit is contained in:
@@ -2,10 +2,14 @@
|
||||
set -euo pipefail
|
||||
|
||||
BASE_URL="${1:-https://wegwichtel.de/api}"
|
||||
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
||||
ROOT_DIR="$(cd -- "$SCRIPT_DIR/.." && pwd)"
|
||||
GPX_FILE="$ROOT_DIR/examples/presentation-route.gpx"
|
||||
JSON_FILE="$ROOT_DIR/examples/presentation-route.json"
|
||||
GPX_FILE="${2:-}"
|
||||
JSON_FILE="${3:-}"
|
||||
|
||||
if [[ ! -f "$GPX_FILE" || ! -f "$JSON_FILE" ]]; then
|
||||
echo "Aufruf: $0 <API-Adresse> <GPX-Datei> <JSON-Datei>" >&2
|
||||
echo "Gib vorhandene Dateien an. Die Beispielstrecken werden nicht mehr mitgeliefert." >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
for command in curl python3; do
|
||||
command -v "$command" >/dev/null 2>&1 || {
|
||||
|
||||
Reference in New Issue
Block a user