joininbox/scripts/menu.update.advanced.sh

75 lines
1.8 KiB
Bash
Raw Normal View History

2020-11-27 23:36:05 +00:00
#!/bin/bash
source /home/joinmarket/_functions.sh
# BASIC MENU INFO
HEIGHT=14
2021-01-04 01:48:20 +00:00
WIDTH=60
CHOICE_HEIGHT=5
2020-11-27 23:36:05 +00:00
TITLE="Advanced update options"
MENU="
Current JoininBox version: $currentJBcommit
Current JoinMarket version: $currentJMversion"
OPTIONS=()
BACKTITLE="JoininBox GUI"
# Basic Options
OPTIONS+=(\
JBRESET "Reinstall the JoininBox scripts and menu" \
2021-01-04 01:48:20 +00:00
JBCOMMIT "Update JoininBox to the latest commit" \
2020-11-27 23:36:05 +00:00
JMPR "Test a JoinMarket pull request" \
JMCOMMIT "Update JoinMarket to the latest commit" \
TOR "Update Tor to the latest alpha"
2020-11-27 23:36:05 +00:00
)
CHOICE=$(dialog --clear \
--backtitle "$BACKTITLE" \
--title "$TITLE" \
--menu "$MENU" \
$HEIGHT $WIDTH $CHOICE_HEIGHT \
"${OPTIONS[@]}" \
2>&1 >/dev/tty)
case $CHOICE in
JBRESET)
updateJoininBox reset
errorOnInstall $?
echo
echo "Press ENTER to return to the menu"
read key
;;
JBCOMMIT)
updateJoininBox commit
errorOnInstall $?
echo
echo "Press ENTER to return to the menu"
read key
;;
JMPR)
read -p "Enter the number of the pull request to be tested: " PRnumber
read -p "Continue to install the PR:
https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/$PRnumber
(Y/N)? " confirm && [[ $confirm == [yY]||$confirm == [yY][eE][sS] ]]||exit 1
stopYG
installJoinMarket testPR $PRnumber
errorOnInstall $?
echo
echo "Press ENTER to return to the menu"
read key
;;
JMCOMMIT)
installJoinMarket commit
errorOnInstall $?
echo
echo "Press ENTER to return to the menu"
read key
;;
TOR)
updateTor
errorOnInstall $?
echo
echo "Press ENTER to return to the menu"
read key
;;
2020-11-27 23:36:05 +00:00
esac