joininbox/scripts/menu.update.sh
openoms 7a61e3b357
update JoinMarket to commit ce32baf, support for Python 3.12 / 3.13, modernize build (#178)
This PR updates JoinMarket to the latest tested commit with Python 3.12/3.13 support and addresses dialog display issues.

### Changes

#### JoinMarket Update
- Update to commit `ce32baf` (latest tested commit from master)
- Refactored install.joinmarket.sh to support both tag-based and commit-based installations
- Improved signature verification using verify.git.sh
- Updated menu.update.sh to display commit hash when using commit-based version

#### Python Support
- Added support for Python 3.12 and 3.13
- Changed version detection order to prefer newer Python versions (3.13 → 3.12 → 3.11 → 3.10 → 3.9 → 3.8)

#### Dialog Fixes
- **Fix border visibility**: Changed dialog border color from `(BLACK,BLACK,ON)` to `(CYAN,BLACK,ON)` in .dialogrc for better visibility
- **Terminal compatibility**: Added fallback for unknown terminal types (e.g., `xterm-ghostty`) by setting `TERM=xterm-256color` when `infocmp` fails
- **Fix box drawing characters**: Set `NCURSES_NO_UTF8_ACS=1` to fix dialog box rendering issues

#### Documentation
- Fixed typo in prepare_remote_node.md: "numbes" → "numbers"
2026-01-18 07:56:26 +01:00

74 lines
2 KiB
Bash
Executable file

#!/bin/bash
source /home/joinmarket/_functions.sh
# BASIC MENU INFO
HEIGHT=15
WIDTH=57
CHOICE_HEIGHT=4
TITLE="Update options"
MENU="
Installed versions:
JoininBox $currentJBcommit
JoinMarket $currentJMversion
$currentBTCversion"
OPTIONS=()
BACKTITLE="JoininBox GUI"
# Basic Options
# Determine if using tag or commit for display
testedVersion=$(grep 'testedJMversion=' < ~/install.joinmarket.sh | grep -v '^#' | cut -d '"' -f 2)
if [ -z "$testedVersion" ]; then
testedVersion=$(grep 'testedJMcommit=' < ~/install.joinmarket.sh | cut -d '"' -f 2 | cut -c 1-12)
testedVersion="${testedVersion} (commit)"
fi
OPTIONS+=(
JOININBOX "Update the JoininBox scripts and menu"
JOINMARKET "Update/reinstall JoinMarket to ${testedVersion}")
if [ "$runningEnv" = "standalone" ]; then
OPTIONS+=(\
BITCOIN "Update Bitcoin Core to a chosen version")
fi
OPTIONS+=(\
ADVANCED "Advanced update options")
CHOICE=$(dialog --clear \
--backtitle "$BACKTITLE" \
--title "$TITLE" \
--ok-label "Select" \
--cancel-label "Back" \
--menu "$MENU" \
$HEIGHT $WIDTH $CHOICE_HEIGHT \
"${OPTIONS[@]}" \
2>&1 >/dev/tty)
case $CHOICE in
JOININBOX)
updateJoininBox
errorOnInstall $?
echo
echo "Press ENTER to return to the menu"
read key;;
JOINMARKET)
/home/joinmarket/install.joinmarket.sh -i update
errorOnInstall $?
echo
menu_resetJMconfig
if [ -f /home/bitcoin/.bitcoin/bitcoin.conf ];then
menu_connectLocalCore
fi
echo
echo "Press ENTER to return to the menu"
read key;;
BITCOIN)
/home/joinmarket/standalone/bitcoin.update.sh custom
errorOnInstall $?
echo
echo "# Start bitcoind .. "
sudo systemctl start bitcoind
echo "# Monitoring the bitcoind logs .. "
showBitcoinLogs;;
ADVANCED)
/home/joinmarket/menu.update.advanced.sh;;
esac