diff options
Diffstat (limited to 'compare_versions.sh')
-rwxr-xr-x | compare_versions.sh | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/compare_versions.sh b/compare_versions.sh deleted file mode 100755 index 757100d..0000000 --- a/compare_versions.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -# Bash script to compare ungoogled-chromium version numbers -# $1 -> up-to-date version number (from atom feed) -# $2 -> currently installed version number -# Return Values: - # 0 -> installed version is up-to-date - # 1 -> installed version can be upgraded - - -# Break into arrays -IFS='.' -read -ra V1 <<< "$1" -read -ra V2 <<< "$2" - -# Determine shorter array (for the loop) -LENGTH=${#V1[@]} - -for (( i = 0 ; i < LENGTH ; i++ )); do - if [ "${V1[$i]}" -gt "${V2[$i]}" ]; then - exit 1 - elif [ "${V1[$i]}" -lt "${V2[$i]}" ]; then - exit 0 - fi -done - -exit 0 |