Browse Source

x230: add verbose output for the upgrade script

pull/102/head
Martin Kepplinger 5 years ago
parent
commit
e1673a90a1
1 changed files with 11 additions and 2 deletions
  1. +11
    -2
      x230/upgrade.sh

+ 11
- 2
x230/upgrade.sh View File

@ -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


Loading…
Cancel
Save