Commit 0ca5c1d7 authored by David Revoy's avatar David Revoy

Prompt at the end of script in a user-friendly way

An attempt at having less to do with this script and get more option
to reboot it instead of closing and relaunching a new instance each
parent a8c46914
......@@ -139,7 +139,7 @@ elif [ "$menuchoicecleaned" = "‣ Community update" ]; then
function_run_in_terminal "$project_root/$folder_tools/"
elif [ "$menuchoicecleaned" = "‣ Render all" ]; then
function_run_in_terminal "$project_root/$folder_tools/"
function_run_in_terminal "$project_root/$folder_tools/ --prompt"
elif [ "$menuchoicecleaned" = "+ Add a new episode" ]; then
function_run_in_terminal "$project_root/$folder_tools/"
......@@ -266,15 +266,26 @@ cat "$project_root"/"$folder_webcomics"/last_updated.txt
# Footer library
function_load_source_lib "$script_absolute_path"/lib/
# Auto upload changes
printf "\033]0;%s\007\n" "Renderfarm (done)"
if [ "$1" = "--prompt" ]; then
# Task is executed inside a terminal window (pop-up)
# This line prevent terminal windows to be auto-closed
# and necessary to read log later, or to reload the script
echo "${Purple} Press [Enter] to exit or ${White}${BlueBG}[r]${Off} to reload or ${White}${BlueBG}[u]${Off} to upload all the change. ${Off}"
echo "${Purple} Press [Enter] to launch renderfarm again or:"
echo "${White}${BlueBG}[q]${Off} => to Quit. ${Off}"
echo "${White}${BlueBG}[u]${Off} => to launch an Upload only. ${Off}"
read -p "?" ANSWER
if [ "$ANSWER" = "r" ]; then
"$project_root"/"$folder_tools"/"$script_filename" --prompt
if [ "$ANSWER" = "q" ]; then
elif [ "$ANSWER" = "u" ]; then
"$project_root"/"$folder_tools"/ --prompt
# Launch a new upload without prompting at the end
# Launch this very script again
"$project_root"/"$folder_tools"/"$script_filename" --prompt
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment