joininbox/scripts/menu.update.sh

49 lines
1.1 KiB
Bash
Raw Normal View History

#!/bin/bash
2020-10-14 10:08:23 +01:00
source /home/joinmarket/_functions.sh
# BASIC MENU INFO
2020-11-27 23:36:05 +00:00
HEIGHT=12
WIDTH=56
2020-11-27 23:36:05 +00:00
CHOICE_HEIGHT=3
2020-10-14 09:39:28 +01:00
TITLE="Update options"
MENU="
Current JoininBox version: $currentJBcommit
Current JoinMarket version: $currentJMversion"
OPTIONS=()
BACKTITLE="JoininBox GUI"
# Basic Options
OPTIONS+=(\
JOININBOX "Update the JoininBox scripts and menu" \
JOINMARKET "Update/reinstall JoinMarket to $(grep JMVersion= < ~/_functions.sh | cut -d '"' -f 2)" \
2020-11-27 23:36:05 +00:00
ADVANCED "Advanced update options" \
)
CHOICE=$(dialog --clear \
--backtitle "$BACKTITLE" \
--title "$TITLE" \
--menu "$MENU" \
$HEIGHT $WIDTH $CHOICE_HEIGHT \
"${OPTIONS[@]}" \
2>&1 >/dev/tty)
case $CHOICE in
JOININBOX)
updateJoininBox
errorOnInstall $?
2020-11-27 23:36:05 +00:00
echo
2020-09-09 11:52:35 +01:00
echo "Press ENTER to return to the menu"
read key
;;
JOINMARKET)
/home/joinmarket/install.joinmarket.sh update
2020-11-27 23:36:05 +00:00
echo
echo "Press ENTER to return to the menu"
read key
2020-11-27 23:36:05 +00:00
;;
ADVANCED)
/home/joinmarket/menu.update.advanced.sh
;;
esac