Fix Linux Mint codename
This commit is contained in:
45
installJRMC
45
installJRMC
@@ -1627,6 +1627,8 @@ update_self() {
|
||||
fi
|
||||
fi
|
||||
|
||||
echo HERE2
|
||||
|
||||
# Download the latest version of the script
|
||||
install_package --silent wget
|
||||
if command -v wget &>/dev/null; then
|
||||
@@ -1637,33 +1639,32 @@ update_self() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Extract and normalize versions inline without subshells
|
||||
local local_version=""
|
||||
while IFS= read -r line; do
|
||||
echo $line
|
||||
case "$line" in
|
||||
*SCRIPT_VERSION=*) local_version=${line#*=}; break;;
|
||||
esac
|
||||
done < "$SCRIPT_PATH"
|
||||
local_version=${local_version#\"} # Remove leading '"'
|
||||
local_version=${local_version%\"} # Remove trailing '"'
|
||||
local_version=${local_version%-dev} # Remove '-dev' suffix
|
||||
echo HERE3
|
||||
|
||||
local remote_version=""
|
||||
while IFS= read -r line; do
|
||||
case "$line" in
|
||||
*SCRIPT_VERSION=*) remote_version=${line#*=}; break;;
|
||||
esac
|
||||
done < "$tmp"
|
||||
remote_version=${remote_version#\"} # Remove leading '"'
|
||||
remote_version=${remote_version%\"} # Remove trailing '"'
|
||||
remote_version=${remote_version%-dev} # Remove '-dev' suffix
|
||||
declare -p
|
||||
|
||||
# Extract and normalize versions using grep
|
||||
local local_version
|
||||
grep -m 1 'SCRIPT_VERSION=' "$SCRIPT_PATH"
|
||||
local_version=$(grep -m 1 'SCRIPT_VERSION=' "$SCRIPT_PATH")
|
||||
local_version=${local_version#*=}
|
||||
local_version=${local_version#\"}
|
||||
local_version=${local_version%\"}
|
||||
local_version=${local_version%-dev}
|
||||
|
||||
local remote_version
|
||||
grep -m 1 'SCRIPT_VERSION=' "$SCRIPT_PATH"
|
||||
remote_version=$(grep -m 1 'SCRIPT_VERSION=' "$tmp")
|
||||
remote_version=${remote_version#*=}
|
||||
remote_version=${remote_version#\"}
|
||||
remote_version=${remote_version%\"}
|
||||
remote_version=${remote_version%-dev}
|
||||
|
||||
echo "$remote_version, $local_version"
|
||||
|
||||
echo HERE4
|
||||
|
||||
[[ -z $remote_version ]] && { rm -f "$tmp"; return 1; }
|
||||
|
||||
echo "$remote_version, $local_version"
|
||||
|
||||
echo HERE5
|
||||
|
||||
|
||||
Reference in New Issue
Block a user