#!/bin/bash ##makedesc: Install Sublime Text source "$( dirname $(readlink -e -- "${BASH_SOURCE}"))/../helpers.sh" || exit 255 # https://www.sublimetext.com/download # https://gist.github.com/skoqaq/3f3e8f28e23c881143cef9cf49d821ff # https://gist.github.com/lugrus2000/1fc55158b87f94d799392a6dd1ac0ce2 # https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47 [ "$1" ] && STVER="$1" || STVER='4189' title mkdir -p "$HOME/install" DEB_PATH="$HOME/install/sublime-text_build-${SMVER}_amd64.deb" BIN_PATH="/opt/sublime_text/sublime_text" if [[ ! -f "$DEB_PATH" ]]; then download https://download.sublimetext.com/sublime-text_build-${STVER}_amd64.deb "$DEB_PATH" fi sudo dpkg -i "$DEB_PATH" sudo cp -f $BIN_PATH $BIN_PATH.old if [[ $STVER = 4169 ]]; then echo "00489f39: c640 0501 4885 c9" | sudo xxd -r - $BIN_PATH else sudo sed -i 's#\x80\x79\x05\x00\x0F\x94\xC2#\xC6\x41\x05\x01\xB2\x00\x90#' $BIN_PATH fi echo success "Sublime Text installed!" $BIN_PATH --version echo