From 764070a86a7aa98480eaaff64dfba7e2f2943292 Mon Sep 17 00:00:00 2001 From: kartofen Date: Thu, 22 Dec 2022 22:43:44 +0200 Subject: refactor --- download-tilesets.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'download-tilesets.sh') diff --git a/download-tilesets.sh b/download-tilesets.sh index f6e477b..a97031b 100755 --- a/download-tilesets.sh +++ b/download-tilesets.sh @@ -2,14 +2,18 @@ cd ${0%/*} # go to project root +if [ $# -eq 0 ]; then + echo "Please provide the path" + exit 1 +fi + URL="https://ftp.batnako.net/tilesets" +FILES=$1 -mkdir -p "files" -mkdir -p "files/tilesets" +mkdir -p "$FILES/tilesets" function download { - path="files/tilesets/$name" - + path="$FILES/tilesets/$name" rm -rf "$path" mkdir "$path" -- cgit v1.2.3