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"
pass=0
while [ $pass == 0 ]
do
echo "What is the WESTside boundary of the area?" echo "What is the WESTside boundary of the area?"
read west read west
case $west in
''|*[!-0-9]*)
echo "Value is no number."
;;
*)
pass=1
;;
esac
done
pass=0
while [ $pass == 0 ]
do
echo "What is the SOUTHside boundary of the area?" echo "What is the SOUTHside boundary of the area?"
read south 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?" echo "What is the EASTside boundary of the area?"
read east 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?" echo "What is the NORTHside boundary of the area?"
read north read north
case $north in
''|*[!-0-9]*)
echo "Value is no number."
;;
*)
pass=1
;;
esac
done
# TODO write settings file and check if input is correct 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