Skip to content

Commit

Permalink
Disable download of recent stop releases list for now
Browse files Browse the repository at this point in the history
Unfortunately downloading the list of recent stop releases from jolla.zendesk.com is not working anymore.
For details, see #48 (comment) ff.
  • Loading branch information
Olf0 authored Oct 16, 2020
1 parent 7c90f87 commit d64f7c3
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions usr/bin/sfos-upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -191,17 +191,20 @@ else
# Jolla 1 phones), thus being the oldest one widely tested to upgrade from (and Jolla may assume
# only early developers to have ever obtained an earlier release on their Jolla 1 phones, hence
# not mentioning 1.0.0.5 in Jolla's "official" guides as a stop release).
if ! recent_stop_releases="$(curl -sS https://jolla.zendesk.com/hc/en-us/articles/201836347 | sed -n '/id="4"/,/id="5"/p' | sed -n '/<ul>/,/<\/ul>/p' | sed -n '/<li>/,/<\/li>/p' | sed 's/<[^>]*>/\n/g' | tr -c '.0-9' '\n' | egrep '^[1-9]\.[0-9]\.[0-9]\.[0-9]$|^[1-9]\.[0-9]\.[0-9]\.[1-9][0-9]$')"
then
echo "Warning: Failed to extract the current \"stop releases\" from https://jolla.zendesk.com/hc/en-us/articles/201836347#4.1" >&2
echo "Hence using an internal, potentially outdated list of stop releases instead." >&2
if [ -z "$set_ssu" ]
then echo -n "Do you want to continue?" >&2
else echo -n "Do you really want to continue?" >&2
fi
askyes >&2
echo >&2
fi
# Unfortunately not working anymore (for details, see https://github.com/Olf0/sfos-upgrade/issues/48#issuecomment-709380565 ff.),
# thus disabling this safety measure against an outdated, internal list (above) for now:
recent_stop_releases=""
#if ! recent_stop_releases="$(curl -sS https://jolla.zendesk.com/hc/en-us/articles/201836347 | sed -n '/id="4"/,/id="5"/p' | sed -n '/<ul>/,/<\/ul>/p' | sed -n '/<li>/,/<\/li>/p' | sed 's/<[^>]*>/\n/g' | tr -c '.0-9' '\n' | egrep '^[1-9]\.[0-9]\.[0-9]\.[0-9]$|^[1-9]\.[0-9]\.[0-9]\.[1-9][0-9]$')"
#then
# echo "Warning: Failed to extract the current \"stop releases\" from https://jolla.zendesk.com/hc/en-us/articles/201836347#4.1" >&2
# echo "Hence using an internal, potentially outdated list of stop releases instead." >&2
# if [ -z "$set_ssu" ]
# then echo -n "Do you want to continue?" >&2
# else echo -n "Do you really want to continue?" >&2
# fi
# askyes >&2
# echo >&2
#fi
all_stop_releases="$(echo -e "${recent_stop_releases}\n$known_stop_releases" | grep -v '^$' | sort -u)"
compar0="$(compare_versions "$installed_release" "$upgrade_release")"
case "$compar0" in
Expand Down

0 comments on commit d64f7c3

Please sign in to comment.