fix update script version
This commit is contained in:
parent
d3f8607075
commit
bbadd35d6d
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
SCRIPT_VERSION="10"
|
SCRIPT_VERSION="91"
|
||||||
SCRIPT_URL='https://raw.githubusercontent.com/wh1te909/tacticalrmm/develop/update.sh'
|
SCRIPT_URL='https://raw.githubusercontent.com/wh1te909/tacticalrmm/develop/update.sh'
|
||||||
YELLOW='\033[1;33m'
|
YELLOW='\033[1;33m'
|
||||||
GREEN='\033[0;32m'
|
GREEN='\033[0;32m'
|
||||||
|
@ -11,7 +11,7 @@ TMP_FILE=$(mktemp -p "" "rmmupdate_XXXXXXXXXX")
|
||||||
curl -s -L "${SCRIPT_URL}" > ${TMP_FILE}
|
curl -s -L "${SCRIPT_URL}" > ${TMP_FILE}
|
||||||
NEW_VER=$(grep "^SCRIPT_VERSION" "$TMP_FILE" | awk -F'[="]' '{print $3}')
|
NEW_VER=$(grep "^SCRIPT_VERSION" "$TMP_FILE" | awk -F'[="]' '{print $3}')
|
||||||
|
|
||||||
if [ "${SCRIPT_VERSION}" \< "${NEW_VER}" ]; then
|
if [ "${SCRIPT_VERSION}" -ne "${NEW_VER}" ]; then
|
||||||
printf >&2 "${YELLOW}A newer version of this update script is available.${NC}\n"
|
printf >&2 "${YELLOW}A newer version of this update script is available.${NC}\n"
|
||||||
printf >&2 "${YELLOW}Please download the latest version from ${GREEN}${SCRIPT_URL}${YELLOW} and re-run.${NC}\n"
|
printf >&2 "${YELLOW}Please download the latest version from ${GREEN}${SCRIPT_URL}${YELLOW} and re-run.${NC}\n"
|
||||||
rm -f $TMP_FILE
|
rm -f $TMP_FILE
|
||||||
|
|
Loading…
Reference in New Issue