my_debian_config/update_sublime.sh

11 lines
346 B
Bash

BUILD=$(
curl -Ls http://www.sublimetext.com/3 |
grep '<h2>Build' |
head -n1 |
sed -E 's#<h2>Build ([0-9]+)</h2>#\1#g'
)
URL_FORMAT='https://download.sublimetext.com/sublime-text_build-%d_amd64.deb';
URL=$(printf "${URL_FORMAT}" "${BUILD}")
FILE=`mktemp`;
wget "$URL" -qO $FILE && sudo dpkg -i $FILE; rm $FILE