1
0
Fork 0

Write settings file

Signed-off-by: merspieler <merspieler@airmail.cc>
This commit is contained in:
merspieler 2018-11-17 23:53:25 +01:00
parent 31c858ca04
commit d793f0ae65

View file

@ -76,13 +76,68 @@ echo "" >> "projects/$project/params.ini"
echo "POINTS_ON_LINE_DISTANCE_MAX = 20" >> "projects/$project/params.ini" echo "POINTS_ON_LINE_DISTANCE_MAX = 20" >> "projects/$project/params.ini"
echo "HIGHWAY_TYPE_MIN = 3" >> "projects/$project/params.ini" echo "HIGHWAY_TYPE_MIN = 3" >> "projects/$project/params.ini"
echo "What is the WESTside boundary of the area?" pass=0
read west while [ $pass == 0 ]
echo "What is the SOUTHside boundary of the area?" do
read south echo "What is the WESTside boundary of the area?"
echo "What is the EASTside boundary of the area?" read west
read east case $west in
echo "What is the NORTHside boundary of the area?" ''|*[!-0-9]*)
read north echo "Value is no number."
;;
*)
pass=1
;;
esac
done
# TODO write settings file and check if input is correct pass=0
while [ $pass == 0 ]
do
echo "What is the SOUTHside boundary of the area?"
read south
case $south in
''|*[!-0-9]*)
echo "Value is no number."
;;
*)
pass=1
;;
esac
done
pass=0
while [ $pass == 0 ]
do
echo "What is the EASTside boundary of the area?"
read east
case $east in
''|*[!-0-9]*)
echo "Value is no number."
;;
*)
pass=1
;;
esac
done
pass=0
while [ $pass == 0 ]
do
echo "What is the NORTHside boundary of the area?"
read north
case $north in
''|*[!-0-9]*)
echo "Value is no number."
;;
*)
pass=1
;;
esac
done
if [ "$west" -lt "0" ]; then
echo "bounds=*${west}_${south}_${east}_${north}" > projects/$project/settings
else
echo "bounds=${west}_${south}_${east}_${north}" > projects/$project/settings
fi