Rend exécutable script gérération carte et correction
This commit is contained in:
parent
067181b0c8
commit
8c43ee8933
6
genmap.sh
Normal file → Executable file
6
genmap.sh
Normal file → Executable file
@ -33,17 +33,17 @@ usage() {
|
||||
action() {
|
||||
[ -z "$1" ] && error "Argument manquant"
|
||||
local serverpath=$(strip "$1")
|
||||
[ ! -d $serverpath ] && error "Le répertoire $serverpath n'existe pas"
|
||||
[ ! -d "$serverpath" ] && error "Le répertoire $serverpath n'existe pas"
|
||||
|
||||
[ -z "$2" ] && error "Nom du world manquant"
|
||||
local world_name=$(strip "$2")
|
||||
|
||||
local world="$serverpath/minetest/worlds/$world_name"
|
||||
[ ! -d $world ] && error "Le répertoire $world n'existe pas"
|
||||
[ ! -d "$world" ] && error "Le répertoire $world n'existe pas"
|
||||
|
||||
[ -z "$3" ] && error "Chemin de destination manquant"
|
||||
local destination=$(strip "$3")
|
||||
[ ! -d destination ] && error "Le répertoire $destination n'existe pas"
|
||||
[ ! -d "$destination" ] && error "Le répertoire $destination n'existe pas"
|
||||
|
||||
[ ! -d "$serverpath/minetestmapper" ] && error "minetestmapper ne semble pas installé"
|
||||
[ ! -e "$serverpath/colors.txt" ] && error "$serverpath/colors.txt manquant"
|
||||
|
Loading…
Reference in New Issue
Block a user