Skip to content
Snippets Groups Projects
Commit 75afb7dc authored by i-bird's avatar i-bird
Browse files

Adding default choice

parent 74b45f40
No related branches found
No related tags found
No related merge requests found
Pipeline #2693 failed
...@@ -2,10 +2,6 @@ ...@@ -2,10 +2,6 @@
function possible_solutions { function possible_solutions {
if [ $sq -eq 1 ]; then
return
fi
sol=1 sol=1
echo "Possible solutions:" echo "Possible solutions:"
for com in "$@" for com in "$@"
...@@ -18,8 +14,13 @@ function possible_solutions { ...@@ -18,8 +14,13 @@ function possible_solutions {
sol=`expr $sol + 1` sol=`expr $sol + 1`
echo "$sol exit the script" echo "$sol exit the script"
echo -e "\033[1;34;5mChoose the solution:\033[0m" echo -e "\033[1;34;5mChoose the solution:\033[0m"
if [ -f default_choice ]; then if [ $sq -eq 1 ]; then
choose=$(cat default_choice) if [ -f cat default_choice ]; then
choose=$(cat default_choice)
else
echo "No solution choosen, continue ... "
return
fi
else else
read choose read choose
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment