-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sublime Text: switch to
add_external_repo
and rm_external_repo
- Loading branch information
1 parent
e6a9012
commit 98410d7
Showing
2 changed files
with
16 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
#!/bin/bash | ||
|
||
status "Adding GPG key..." | ||
wget -qO- https://download.sublimetext.com/sublimehq-pub.gpg | sudo tee /etc/apt/trusted.gpg.d/sublimehq.asc || 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 | ||
|
||
(install_packages sublime-text) | ||
if [ $? != 0 ];then | ||
#if install_packages fails, remove repository | ||
sudo rm -f /etc/apt/sources.list.d/sublime-text.list | ||
exit 1 | ||
#remove deprecated files | ||
sudo rm -f /etc/apt/trusted.gpg.d/sublimehq.asc /etc/apt/sources.list.d/sublime-text.list | ||
|
||
add_external_repo "sublimehq" "https://download.sublimetext.com/ apt/stable/" "https://download.sublimetext.com/sublimehq-pub.gpg" || exit 1 | ||
|
||
apt_update | ||
if [ $? != 0 ]; then | ||
rm_external_repo "sublimehq" | ||
error "Failed to perform apt update after adding sublimehq repository." | ||
fi | ||
|
||
install_packages sublime-text || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters