Skip to content

Commit

Permalink
Fix maps dir output path
Browse files Browse the repository at this point in the history
  • Loading branch information
ChillerDragon committed Mar 19, 2024
1 parent 3923833 commit 3ee8ce3
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions lib/get_maps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ function parse_args() {
err "--output-dir requires an argument"
exit 1
fi
if [ "${ARG_OUTPUT_DIR::1}" != "/" ]
then
err "--output-dir has to point to an absolute path"
exit 1
fi
elif [ "$arg" = "--source" ]
then
ARG_SOURCE="$1"
Expand Down Expand Up @@ -193,7 +198,7 @@ function download_archive() {
if [ "$count" != 0 ]
then
log "found $count maps. copying ..."
cp "$tmp_maps_dir/$dir"/*.map "$maps_dir"
cp "$tmp_maps_dir/$dir"/*.map "$maps_dir" || exit 1
found=1
fi
fi
Expand Down Expand Up @@ -297,15 +302,6 @@ function select_option() {
function menu() {
check_server_dir
select_maps_dir
if [ ! -d "$maps_dir" ]
then
err "Error: maps directory not found '$maps_dir'"
err " try running the following command first"
err ""
err " mkdir $maps_dir"
err ""
exit 1
fi
if [[ -d "$maps_dir" ]] && [[ "$(ls "$maps_dir")" != "" ]]
then
num_maps="$(find "$maps_dir" | wc -l)"
Expand Down

0 comments on commit 3ee8ce3

Please sign in to comment.