Sublime text: add install-64

pull/845/head
Botspot 3 years ago
parent 284a1c4aa1
commit 876722f169

@ -0,0 +1,18 @@
#!/bin/bash
DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")"
function error {
echo -e "\\e[91m$1\\e[39m"
exit 1
}
echo "Adding GPG key..."
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - || error "Failed to add GPG key for sublime-text repository!"
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt update || error "Failed to run 'sudo apt update'!"
sudo apt install sublime-text || error "APT failed to install sublime-text package!"

@ -7,8 +7,17 @@ function error {
exit 1
}
rm ~/.local/share/applications/sublime-text.desktop
rm -rf ~/"Sublime Text 2"
if [ ! -z "$(file "$(readlink -f "/sbin/init")" | grep 64)" ];then
#arch=64
sudo apt purge sublime-text
elif [ ! -z "$(file "$(readlink -f "/sbin/init")" | grep 32)" ];then
#arch=32
rm -f ~/.local/share/applications/sublime-text.desktop
rm -rf ~/"Sublime Text 2"
else
error "Failed to detect OS CPU architecture! Something is very wrong."
fi
exit 0

Loading…
Cancel
Save