You do not want to download the entire html page. Following the idea of FichteFoll, I found
http://www.sublimetext.com/updates/3/stable/updatecheck?platform=linux&arch=x64
Given the output
{
"latest_version": 3126,
"update_url": "https://www.sublimetext.com/3",
"manifest_host": "www.sublimetext.com",
"update_host": "download.sublimetext.com",
"manifest_path_osx": "/_pak/sublime_text_osx_3126.manifest.xz",
"update_path_osx": "/sublime_text_osx_3126.pak.xz",
"manifest_path_windows_x64": "/_pak/sublime_text_windows_x64_3126.manifest.xz",
"update_path_windows_x64": "/sublime_text_windows_x64_3126.pak.xz",
"manifest_path_windows_x32": "/_pak/sublime_text_windows_x32_3126.manifest.xz",
"update_path_windows_x32": "/sublime_text_windows_x32_3126.pak.xz"
}
I ended up with:
BUILD=`curl -s http://www.sublimetext.com/updates/3/stable/updatecheck?platform=linux | python -c 'import json,sys;obj=json.load(sys.stdin);print obj["latest_version"]'`
echo ${BUILD}
URL=https://download.sublimetext.com/sublime_text_3_build_${BUILD}_x64.tar.bz2
wget $URL
tar -xvf sublime_text_3_build_${BUILD}_x64.tar.bz2 sublime_text_3
cp sublime_text_3/sublime_text.desktop ~/.local/share/applications/sublime_text.desktop
Hoping the download paths will remain the same. However, this should not be the way to update this application under Linux.
To get this url I captured the request during the start of sublime_text
tcpdump -i any -w /tmp/sublime.log -s 1500 -A host 209.20.75.76 and tcp port http
tcpdump -A -r /tmp/sublime.log | less