#!/bin/bash
#install box86
"${DIRECTORY}/manage" install-if-not-installed Box86 || error "Box86 failed to install somehow!"
wget https://download.sublimetext.com/Sublime%20Text%202.0.2.tar.bz2 -O ~/sublime-text-2.tar.bz2 || error 'Failed to download!'
tar -xf ~/sublime-text-2.tar.bz2 || error 'Failed to extract!'
rm -f sublime-text-2.tar.bz2

echo "[Desktop Entry]
Name=Sublime Text
Comment=Popular text editor with native support for most programming languages.
Exec=box86 '$HOME/Sublime Text 2/sublime_text'
Icon=$(dirname "$0")/icon-64.png
Terminal=false
StartupNotify=true
Type=Application
Categories=Development;" > ~/.local/share/applications/sublime-text.desktop || error "Failed to create menu button!"

