Skip to content

Commit 8ffb6c5

Browse files
committed
menu formatting
1 parent 3300a1d commit 8ffb6c5

1 file changed

Lines changed: 23 additions & 22 deletions

File tree

scripts/menu.sh

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -30,29 +30,30 @@ OPTIONS+=(
3030
"" ""
3131
CONFIG "Connection and joinmarket.cfg settings" \
3232
TOOLS "Extra helper functions and services")
33-
if [ "${runningEnv}" != mynode ]; then
34-
OPTIONS+=(UPDATE "Update JoininBox or JoinMarket")
35-
OPTIONS+=("" "")
36-
OPTIONS+=(SHUTDOWN "Switch off the computer")
37-
OPTIONS+=(RESTART "Restart the computer")
38-
HEIGHT=$((HEIGHT+4))
39-
CHOICE_HEIGHT=$((CHOICE_HEIGHT+4))
40-
fi
41-
if [ "${runningEnv}" = raspiblitz ]; then
42-
OPTIONS+=(BLITZ "Switch to the RaspiBlitz menu")
43-
HEIGHT=$((HEIGHT+1))
44-
CHOICE_HEIGHT=$((CHOICE_HEIGHT+1))
45-
fi
33+
if [ "${runningEnv}" != mynode ]; then
34+
OPTIONS+=(UPDATE "Update JoininBox or JoinMarket")
35+
OPTIONS+=("" "")
36+
if [ "${runningEnv}" = raspiblitz ]; then
37+
OPTIONS+=(BLITZ "Switch to the RaspiBlitz menu")
38+
HEIGHT=$((HEIGHT+1))
39+
CHOICE_HEIGHT=$((CHOICE_HEIGHT+1))
40+
fi
41+
OPTIONS+=(REBOOT "Restart the computer")
42+
OPTIONS+=(SHUTDOWN "Switch off the computer")
43+
HEIGHT=$((HEIGHT+4))
44+
CHOICE_HEIGHT=$((CHOICE_HEIGHT+4))
45+
fi
4646

47-
CHOICE=$(dialog --clear \
48-
--backtitle "$BACKTITLE" \
49-
--title "$TITLE" \
50-
--ok-label "Select" \
51-
--cancel-label "Exit" \
52-
--menu "$MENU" \
53-
$HEIGHT $WIDTH $CHOICE_HEIGHT \
54-
"${OPTIONS[@]}" \
55-
2>&1 >/dev/tty)
47+
CHOICE=$(dialog \
48+
--clear \
49+
--backtitle "$BACKTITLE" \
50+
--title "$TITLE" \
51+
--ok-label "Select" \
52+
--cancel-label "Exit" \
53+
--menu "$MENU" \
54+
$HEIGHT $WIDTH $CHOICE_HEIGHT \
55+
"${OPTIONS[@]}" \
56+
2>&1 >/dev/tty)
5657

5758
case $CHOICE in
5859
START)

0 commit comments

Comments
 (0)