|
@@ -1654,16 +1654,22 @@ update_self() {
|
|
|
|
|
|
echo HERE3
|
|
echo HERE3
|
|
|
|
|
|
|
|
+ declare -p
|
|
|
|
+
|
|
# Compare versions and update if necessary
|
|
# Compare versions and update if necessary
|
|
local local_version
|
|
local local_version
|
|
local_version=$(extract_version "$SCRIPT_PATH")
|
|
local_version=$(extract_version "$SCRIPT_PATH")
|
|
local remote_version
|
|
local remote_version
|
|
remote_version=$(extract_version "$tmp")
|
|
remote_version=$(extract_version "$tmp")
|
|
|
|
|
|
|
|
+ echo HERE4
|
|
|
|
+
|
|
[[ -z $remote_version ]] && { rm -f "$tmp"; return 1; }
|
|
[[ -z $remote_version ]] && { rm -f "$tmp"; return 1; }
|
|
|
|
|
|
echo "$remote_version, $local_version"
|
|
echo "$remote_version, $local_version"
|
|
|
|
|
|
|
|
+ echo HERE5
|
|
|
|
+
|
|
if [[ $local_version < $remote_version ]]; then
|
|
if [[ $local_version < $remote_version ]]; then
|
|
echo "Newer version of installJRMC found. Updating..."
|
|
echo "Newer version of installJRMC found. Updating..."
|
|
execute mv "$tmp" "$SCRIPT_PATH"
|
|
execute mv "$tmp" "$SCRIPT_PATH"
|