Skip to content

Commit 07a01d7

Browse files
Introduce of version_script_check
1 parent c84315c commit 07a01d7

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

decenomy.sh

+11-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ NC='\033[0m'
1919
ASCII_L="--│█│█"
2020
ASCII_R="│█│█--"
2121
ASCII_LINE="--------------------------------------------------------------"
22-
SCRIPVERSION=v1.0.2
22+
SCRIPVERSION=v1.0.3
2323
SCRIPT_GITHUB=https://api.github.com/repos/decenomy/mnscript/releases/latest
2424
SCRIPT_FILE=`curl -s $SCRIPT_GITHUB | grep "browser_download_url.*decenomy.sh" | cut -d : -f 2,3 | tr -d \" | xargs`
2525
NODEIP=$(curl --fail --retry 3 -s4 icanhazip.com)
@@ -31,6 +31,8 @@ fi
3131

3232
# Header for menu screen.
3333
header() {
34+
version_script_check
35+
echo
3436
echo -e "${BLUE}${BOLD}
3537
\t\t ██████╗ ███╗ ███╗██╗ ██╗
3638
\t\t ██╔══██╗████╗ ████║╚██╗ ██╔╝
@@ -2122,6 +2124,14 @@ function wallet_install_check() {
21222124
clear
21232125
}
21242126

2127+
# Process for Prompting Information About a New Version of the Script.
2128+
function version_script_check() {
2129+
LATEST_VERSION=$(curl -s $SCRIPT_GITHUB | grep -oP '(?<="tag_name": ")[^"]+')
2130+
if [ "$SCRIPTVERSION" != "$LATEST_VERSION" ]; then
2131+
echo -e "${RED}New script version available:${NC} $LATEST_VERSION"
2132+
fi
2133+
}
2134+
21252135
# Process to upgrade script version.
21262136
function upgrade_script() {
21272137
cp decenomy decenomy_old

0 commit comments

Comments
 (0)