Browse Source

Remove 'ask' function defined in another branch...

Oops
mario forzanini 2 years ago
parent
commit
4d9b64bf36
1 changed files with 8 additions and 1 deletions
  1. 8 1
      lcmlog

+ 8 - 1
lcmlog

@@ -293,7 +293,14 @@ method_post()
 	done
 
 	SEND_MAIL=""
-	ask "Send the log via email? [default: y]" "y" && SEND_MAIL="MAIL"
+	read -p "Send the log via email? [default: y] " AUX
+	while [ "$AUX" != "y" ] && [ "$AUX" != "n" ] && ! [ -z "$AUX" ]; do
+		read -p "Yes (y) or no (n)? [default: y] " AUX
+	done
+	[ -z "$AUX" ] && AUX="y"
+	if [ "$AUX" = "y" ]; then
+		SEND_MAIL="MAIL"
+	fi
 
 	# Update of the pipe
 	printf "%s\n" "POST" >> $pipe