Colors for version IDs

This commit is contained in:
Michael Stanclift 2020-05-29 21:01:52 -05:00
parent 7b92b90580
commit 55d443f37b

View File

@ -882,20 +882,26 @@ function list_gs_arguments {
exit_nochange
}
# Output Version
# Version Control
## Show Version
function show_version {
MESSAGE="${PROGRAM} by @vmstan"
echo_info
MESSAGE="Running Version: ${VERSION}"
MESSAGE="Running Version: ${GREEN}${VERSION}${NC}"
echo_info
GITVERSION=$(curl -sf https://raw.githubusercontent.com/vmstan/gravity-sync/development/VERSION)
if [ -z "$GITVERSION" ]
then
MESSAGE="Latest Version: Unknown"
MESSAGE="Latest Version: ${RED}Unknown${NC}"
else
MESSAGE="Latest Version: ${GITVERSION}"
if [ "$GITVERSION" != "$VERSION" ]
then
MESSAGE="Upgrade Available: ${PURPLE}${GITVERSION}${NC}"
else
MESSAGE="Latest Version: ${GREEN}${GITVERSION}${NC}"
fi
fi
echo_info
}