diff options
author | kartofen <mladenovnasko0@gmail.com> | 2022-12-22 22:43:44 +0200 |
---|---|---|
committer | kartofen <mladenovnasko0@gmail.com> | 2022-12-22 22:43:44 +0200 |
commit | 764070a86a7aa98480eaaff64dfba7e2f2943292 (patch) | |
tree | 830589ac702d540bfd76cfb0e5faa5e8988432b0 /download-tilesets.sh | |
parent | 4c9fafc4c126af2466dc6c56b9c952f901a1c726 (diff) |
refactor
Diffstat (limited to 'download-tilesets.sh')
-rwxr-xr-x | download-tilesets.sh | 12 |
1 files changed, 8 insertions, 4 deletions
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" |