summaryrefslogtreecommitdiff
path: root/update_ungoogled_chromium-portable_linux_64.sh
diff options
context:
space:
mode:
authorlshprung <lshprung@yahoo.com>2021-08-17 17:38:27 -0700
committerlshprung <lshprung@yahoo.com>2021-08-17 17:38:27 -0700
commitcd9121bcc58c94c91c22e2758eb6b8bac5ebf9b2 (patch)
tree94d5bc13074b67c388109daf5a18a0d7d12c1de7 /update_ungoogled_chromium-portable_linux_64.sh
parentd11e881244e3661cb00c3359497e24ef98d62735 (diff)
Progress to comparing versions
Diffstat (limited to 'update_ungoogled_chromium-portable_linux_64.sh')
-rwxr-xr-xupdate_ungoogled_chromium-portable_linux_64.sh19
1 files changed, 18 insertions, 1 deletions
diff --git a/update_ungoogled_chromium-portable_linux_64.sh b/update_ungoogled_chromium-portable_linux_64.sh
index e8d7d32..05ee765 100755
--- a/update_ungoogled_chromium-portable_linux_64.sh
+++ b/update_ungoogled_chromium-portable_linux_64.sh
@@ -3,6 +3,10 @@
# Shell script to update ungoogled-chromium Portable Linux 64-bit to the latest version
# $1 -> Wrapper symlink location
# $2 (optional) -> Install location
+# Return Values:
+ # 0 -> failed
+ # 1 -> success, installed new version
+ # 2 -> success, did not install new version
# If first time installing: user must specify a symlink location and an installation directory
# If checking for updates: user must pass a symlink for ungoogled-chromium (this is typically just the command name if a symlink is part of the path)
@@ -55,5 +59,18 @@ if [ -h "$1" ]; then
echo "$MY_VERSION"
# Compare versions to determine if an update is necessary
-fi
+ $(get_absolute_path "compare_versions.sh") "$VERSION" "$MY_VERSION"
+ if [ $? -eq 0 ]; then
+ echo "ungoogled-chromium $MY_VERSION is up to date"
+ exit 2
+ fi
+
+ echo -n "Upgrade ungoogled-chromium to $VERSION? [Y/n] "
+ read INPUT
+ if [ "$INPUT" == "n" ]; then
+ exit 2
+ fi
+ # Prepare variables for upgrade
+ echo "ready to go"
+fi