diff --git a/x230/upgrade.sh b/x230/upgrade.sh index f32880d..77f9fb9 100755 --- a/x230/upgrade.sh +++ b/x230/upgrade.sh @@ -13,19 +13,24 @@ usage() echo " This script checks if there's a newer" echo " release of the X230 Skulls package available." echo "" - echo "Usage: $0" + echo "Usage: $0 [-v]" } -args=$(getopt -o h -- "$@") +args=$(getopt -o hv -- "$@") if [ $? -ne 0 ] ; then usage exit 1 fi +verbose=0 + eval set -- "$args" while [ $# -gt 0 ] do case "$1" in + -v) + verbose=1 + ;; -h) usage exit 1 @@ -58,6 +63,10 @@ if [[ -z "$UPSTREAM_X230" ]] ; then exit 0 fi +if [[ $verbose -gt 0 ]] ; then + echo "This is v$CURRENT_VERSION and latest is v$UPSTREAM_VERSION" +fi + if [[ "$CURRENT_VERSION" = "$UPSTREAM_VERSION" ]] ; then echo -e "${GREEN}You are using the latest version of Skulls for the X230${NC}" exit 0