Ok so,
I'm making a program in ZSH and I've made all the client-sided scripts that are run with commands
I'm having two problems where I need to set "Checkpoints" just like in videogame.
First Problem:
A="LUNGOTEVEREMARZIO-UMBERTO (RM-CTR54)"
B="LUNGOTEVEREMARZIO-UMBERT1 (RM-CTR55)"
vared -p 'Which device would you like to access? ' -c tmp
X=$tmp
if [[ $tmp == 'A' ]]; then
F=${A}
elif [[ $tmp == 'B' ]]; then
F=${B}
else
echo 'Error, CODE176, Variable not found. Please upload logStamp.txt to Ranieri#0001 on Discord'
log start(./logstamp.txt)
sleep 2
echo Selected Option ${tmp}: ${F}
Here, I'd like for line 13 to proceed after the variables are set, however, after the variables are set the script just stops (I understand why it does that, I just need a way to stop it.
Here, is problem 2:
vared -p 'Awaiting Commands >> ' -c response
if [[ $response == 'GG stop' ]]; then
echo '${sTT}'
STATUS='${stopResponse}'
elif [ $response == 'GG start' ]]; then
echo '${srTT}'
STATUS='${startResponse}'
./TrStart.js
fi
Here, I'd like to go back to line 1 (vared) so that the users can input more commands. I was thinking both of the problems are similar to "Checkpoints" in VGs as i'm basically trying to go back to a selected point and be able to rerun the script from there. I thought of just repasting the entire thing in the if statementes but I know there has to be a MUCH more efficient way.
Any help is much appreciated
Cheers,
RCdS
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…