2020-11-27 23:36:05 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
source /home/joinmarket/_functions.sh
|
|
|
|
|
|
|
|
|
|
# BASIC MENU INFO
|
2021-02-05 18:07:09 +00:00
|
|
|
HEIGHT=14
|
2021-01-04 01:48:20 +00:00
|
|
|
WIDTH=60
|
2021-02-05 18:07:09 +00:00
|
|
|
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" \
|
2021-02-05 18:07:09 +00:00
|
|
|
JMCOMMIT "Update JoinMarket to the latest commit" \
|
2021-01-30 17:50:47 +00:00
|
|
|
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
|
|
|
|
|
;;
|
2021-02-05 18:07:09 +00:00
|
|
|
JMCOMMIT)
|
|
|
|
|
installJoinMarket commit
|
|
|
|
|
errorOnInstall $?
|
|
|
|
|
echo
|
|
|
|
|
echo "Press ENTER to return to the menu"
|
|
|
|
|
read key
|
|
|
|
|
;;
|
2021-01-30 17:50:47 +00:00
|
|
|
TOR)
|
|
|
|
|
updateTor
|
|
|
|
|
errorOnInstall $?
|
|
|
|
|
echo
|
|
|
|
|
echo "Press ENTER to return to the menu"
|
|
|
|
|
read key
|
|
|
|
|
;;
|
2020-11-27 23:36:05 +00:00
|
|
|
esac
|