Fix Linux Mint codename

This commit is contained in:
2024-09-03 20:33:38 -04:00
parent 68bc8ba6b9
commit 0b02edd338

View File

@@ -1627,8 +1627,6 @@ update_self() {
fi fi
fi fi
echo HERE2
# Download the latest version of the script # Download the latest version of the script
install_package --silent wget install_package --silent wget
if command -v wget &>/dev/null; then if command -v wget &>/dev/null; then
@@ -1639,24 +1637,26 @@ update_self() {
return 1 return 1
fi fi
echo HERE3 # Extract and normalize versions inline without subshells
local local_version=""
while IFS= read -r line; do
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
declare -p local remote_version=""
while IFS= read -r line; do
# Extract and normalize versions inline case "$line" in
local local_version *SCRIPT_VERSION=*) remote_version=${line#*=}; break;;
local_version=$(grep -m 1 'SCRIPT_VERSION=' "$SCRIPT_PATH") esac
local_version=${local_version#*=} done < "$tmp"
local_version=${local_version#\"} remote_version=${remote_version#\"} # Remove leading '"'
local_version=${local_version%\"} remote_version=${remote_version%\"} # Remove trailing '"'
local_version=${local_version%-dev} remote_version=${remote_version%-dev} # Remove '-dev' suffix
local remote_version
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 HERE4 echo HERE4
@@ -1678,6 +1678,7 @@ update_self() {
main() { main() {
debug "Running: ${FUNCNAME[0]} $*" debug "Running: ${FUNCNAME[0]} $*"