From 74b45f40a953ffd145867d3a3ad1d242f714b378 Mon Sep 17 00:00:00 2001
From: i-bird <i-bird@localhost.localdomain>
Date: Fri, 29 Jan 2021 13:57:41 +0100
Subject: [PATCH] Adding default choice

---
 script/show_solutions | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/script/show_solutions b/script/show_solutions
index d398e6525..c1f49a6a2 100755
--- a/script/show_solutions
+++ b/script/show_solutions
@@ -18,7 +18,11 @@ function possible_solutions {
  sol=`expr $sol + 1`
  echo "$sol exit the script"
  echo -e "\033[1;34;5mChoose the solution:\033[0m"
- read choose
+ if [ -f default_choice ]; then
+   choose=$(cat default_choice)
+ else
+   read choose
+ fi
  if [ x"$choose" = x"$sol" ]; then
   exit 1
  fi
-- 
GitLab