diff --git a/Makefile b/Makefile index 12a85ce..e7d6c49 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# Autogenerated at 29.11.2024 16:47 using ./gen-makefile +# Autogenerated at 09.01.2025 15:37 using ./gen-makefile .DEFAULT_GOAL := help #=============================================== @@ -25,7 +25,7 @@ chrome: composer: @./install/composer -##docker: Install docker (latest) + docker-compose (latest) + ppa +##docker: Install docker (latest) + ppa docker: @./install/docker @@ -173,6 +173,10 @@ rustdesk: snap: @./install/snap +##sublimemerge: Install Sublime Merge +sublimemerge: + @./install/sublimemerge + ##sublimetext: Install Sublime Text sublimetext: @./install/sublimetext @@ -294,6 +298,14 @@ phpstack: php phptools /omz: @./uninstall/omz +##/sublimemerge: Uninstall Sublime Merge +/sublimemerge: + @./uninstall/sublimemerge + +##/sublimetext: Uninstall Sublime Text +/sublimetext: + @./uninstall/sublimetext + ##/vivaldi: Uninstall vivaldi + ppa /vivaldi: @./uninstall/vivaldi diff --git a/install/sublimemerge b/install/sublimemerge new file mode 100755 index 0000000..71d5517 --- /dev/null +++ b/install/sublimemerge @@ -0,0 +1,45 @@ +#!/bin/bash +##makedesc: Install Sublime Merge +source "$( dirname $(readlink -e -- "${BASH_SOURCE}"))/../helpers.sh" || exit 255 + +# https://www.sublimemerge.com/download +# https://gist.github.com/lugrus2000/1fc55158b87f94d799392a6dd1ac0ce2 +# https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47 + +[ "$1" ] && SMVER="$1" || SMVER='2102' + +title + +mkdir -p "$HOME/install" +DEB_PATH="$HOME/install/sublime-merge_build-${SMVER}_amd64.deb" +BIN_PATH="/opt/sublime_merge/sublime_merge" + +if [[ ! -f "$DEB_PATH" ]]; then + download https://download.sublimetext.com/sublime-merge_build-${SMVER}_amd64.deb "$DEB_PATH" +fi + +sudo dpkg -i "$DEB_PATH" +# sudo cp -f $BIN_PATH $BIN_PATH.old + +# if [[ $SMVER = 2102 ]]; then + #TODO not working + # printf '\x48\xC7\xC0\x19\x01\x00\x00\xC3' | sudo dd of=$BIN_PATH bs=1 seek=$((0x003A5400)) conv=notrunc + # printf '\x90\x90\x90\x90\x90' | sudo dd of=$BIN_PATH bs=1 seek=$((0x003A7EC9)) conv=notrunc + # printf '\x90\x90\x90\x90\x90' | sudo dd of=$BIN_PATH bs=1 seek=$((0x003A7EE4)) conv=notrunc + # printf '\x48\x31\xC0\x48\xFF\xC0\xC3' | sudo dd of=$BIN_PATH bs=1 seek=$((0x003A67FE)) conv=notrunc + # printf '\xC3' | sudo dd of=$BIN_PATH bs=1 seek=$((0x003A514E)) conv=notrunc + # printf '\xC3' | sudo dd of=$BIN_PATH bs=1 seek=$((0x003A40D2)) conv=notrunc + + #TODO segfault + # echo 0045a360: 48 C7 C0 19 01 00 00 C3 | sudo xxd -r - $BIN_PATH + # echo 0045d21d: 90 90 90 90 90 | sudo xxd -r - $BIN_PATH + # echo 0045d23a: 90 90 90 90 90 | sudo xxd -r - $BIN_PATH + # echo 0045b990: C3 | sudo xxd -r - $BIN_PATH + # echo 0045a05a: C3 | sudo xxd -r - $BIN_PATH + # echo 00459aba: C3 | sudo xxd -r - $BIN_PATH +# fi + +echo +success "Sublime Merge installed!" +$BIN_PATH --version +echo diff --git a/install/sublimetext b/install/sublimetext index 8b66fff..a02b0b5 100755 --- a/install/sublimetext +++ b/install/sublimetext @@ -2,27 +2,33 @@ ##makedesc: Install Sublime Text source "$( dirname $(readlink -e -- "${BASH_SOURCE}"))/../helpers.sh" || exit 255 -# https://www.sublimetext.com/download_thanks?target=x64-deb +# 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" -download https://download.sublimetext.com/sublime-text_build-${STVER}_amd64.deb \ - "$HOME/install/sublime-text_build-${STVER}_amd64.deb" && \ - sudo dpkg -i "$HOME/install/sublime-text_build-${STVER}_amd64.deb" +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 -sudo cp -f /opt/sublime_text/sublime_text /opt/sublime_text/sublime_text.old if [[ $STVER = 4169 ]]; then - echo "00489f39: c640 0501 4885 c9" | sudo xxd -r - /opt/sublime_text/sublime_text + 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/' /opt/sublime_text/sublime_text + 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!" -subl --version +$BIN_PATH --version echo diff --git a/uninstall/sublimemerge b/uninstall/sublimemerge new file mode 100755 index 0000000..e9315b6 --- /dev/null +++ b/uninstall/sublimemerge @@ -0,0 +1,10 @@ +#!/bin/bash +##makedesc: Uninstall Sublime Merge +source "$( dirname $(readlink -e -- "${BASH_SOURCE}"))/../helpers.sh" || exit 255 + +title + +dpkg_remove sublime-merge +sudo rm -rf /opt/sublime_merge + +success "Sublime Merge removed!" diff --git a/uninstall/sublimetext b/uninstall/sublimetext new file mode 100755 index 0000000..0cb7d58 --- /dev/null +++ b/uninstall/sublimetext @@ -0,0 +1,10 @@ +#!/bin/bash +##makedesc: Uninstall Sublime Text +source "$( dirname $(readlink -e -- "${BASH_SOURCE}"))/../helpers.sh" || exit 255 + +title + +dpkg_remove sublime-text +sudo rm -rf /opt/sublime_text + +success "Sublime Text removed!"