├── sublime_text.png ├── LICENSE.md ├── README.md ├── sublime_installer.sh └── recipes └── ubuntu.sh /sublime_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waldyr/sublime-installer/HEAD/sublime_text.png -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (C) 2012: Waldyr Araújo 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Sublime Installer"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Sublime Installer (Not maintained anymore) 2 | 3 | Sublime Installer is a simple script for Sublime Text Editor auto setup. It gives you: 4 | * Sublime 2.0.1 Text Editor 5 | * Sublime's Custom Icon 6 | * Sublime's Plugin: Package Control 7 | * Sublime's Plugin: Emmet (Old Zen Coding) 8 | 9 | ### Distros supported: 10 | * Ubuntu 10.04+ 11 | 12 | 13 | ## Getting Started 14 | 15 | ### Usage 16 | Just type the following line on your terminal, read the instructions carefully and let the script do the job for you! 17 | _Problems?! Please take a look at [troubleshooting section](https://github.com/waldyr/Sublime-Installer/edit/master/README.md#troubleshooting)_ 18 | 19 | ```` 20 | wget --no-check-certificate https://raw.github.com/waldyr/Sublime-Installer/master/sublime_installer.sh && bash sublime_installer.sh 21 | ```` 22 | 23 | ## Troubleshooting 24 | 25 | Be sure to wait for load PyV8 binary. If it persists, please start an issue [here](https://github.com/waldyr/Sublime-Installer/issues/new) and let me know what happened. 26 | 27 | ## Additional Information 28 | 29 | ### Suggestions or Contributions 30 | You can freely email me, if happened anything unexpected, if it works like a charm or also give me suggestions. I'll answer you ASAP with the due respect! 31 | For contributions, I will analyze if your pull request is within the scope and the minimum correctness, furthermore you will be added in the contributors section, that by the way is empty. 32 | 33 | ### Sublime Package Control 34 | http://wbond.net/sublime_packages/package_control 35 | 36 | ### Emmet (Old Zen Coding) 37 | https://github.com/sergeche/emmet-sublime 38 | 39 | ### Sublime's custom image 40 |

41 | Sublime's custom image 42 |

43 | -------------------------------------------------------------------------------- /sublime_installer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | shopt -s nocaseglob 4 | set -e 5 | 6 | script_runner=$(whoami) 7 | sublime_installer_path=$(cd && pwd)/sublime_installer 8 | log_file="$sublime_installer_path/install.log" 9 | 10 | control_c() 11 | { 12 | echo -en "\n\n*** Exiting ***\n\n" 13 | exit 1 14 | } 15 | 16 | trap control_c SIGINT 17 | 18 | clear 19 | 20 | echo "#######################################" 21 | echo "########## Sublime Installer ##########" 22 | echo "#######################################" 23 | 24 | # determine the distro 25 | if [[ $MACHTYPE = *linux* ]] ; then 26 | distro_sig=$(cat /etc/issue) 27 | if [[ $distro_sig =~ ubuntu ]] ; then 28 | distro="ubuntu" 29 | else 30 | echo -e "\nSublime Installer currently only supports Ubuntu\n" 31 | exit 1 32 | fi 33 | fi 34 | 35 | # check if user is root 36 | if [ $script_runner == "root" ] ; then 37 | echo -e "\nThis script must be run as a normal user with sudo privileges\n" 38 | exit 1 39 | fi 40 | 41 | echo -e "\n\n" 42 | echo "run tail -f $log_file in a new terminal to watch the install" 43 | 44 | echo -e "\n" 45 | echo "What this script gets you:" 46 | echo " * Sublime Text Editor" 47 | echo " * Sublime's Custom Icon" 48 | echo " * Package Control" 49 | echo " * Emmet (Old Zen Coding)" 50 | 51 | echo -e "\nThis script is always changing." 52 | echo "Make sure you got it from https://github.com/waldyr/Sublime-Installer" 53 | 54 | # Check if the user has sudo privileges. 55 | sudo -v >/dev/null 2>&1 || { echo $script_runner has no sudo privileges ; exit 1; } 56 | 57 | echo -e "\n=> Creating install dir..." 58 | cd && mkdir -p sublime_installer/src && cd sublime_installer && touch install.log 59 | echo "==> done..." 60 | 61 | echo -e "\n=> Downloading and running recipe for $distro...\n" 62 | wget --no-check-certificate -O $sublime_installer_path/src/$distro.sh https://raw.github.com/waldyr/Sublime-Installer/master/recipes/$distro.sh && cd $sublime_installer_path/src && bash $distro.sh $sublime_installer_path $log_file 63 | 64 | echo -e "\n#################################" 65 | echo "### Installation is complete! ###" 66 | echo -e "#################################\n" 67 | -------------------------------------------------------------------------------- /recipes/ubuntu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | script_runner=$(whoami) 4 | sublime_installer_path=$1 5 | log_file=$2 6 | 7 | # Determine which sublime the user want 8 | echo "Install as ppa or download portable version?" 9 | echo "=> 1. Portable version" 10 | echo "=> 2. PPA version" 11 | echo -n "Type [1 or 2]? " 12 | read whichSublime 13 | 14 | if [[ $whichSublime -eq 1 ]] ; then 15 | 16 | # Determine whether is 64 or 32 17 | krnl=$(uname -i) 18 | echo -e "\n=> Downloading Sublime Text Editor 2..." 19 | if [[ $krnl = 'x86_64' ]] ; then 20 | wget -NP $sublime_installer_path/src http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.1%20x64.tar.bz2 >> $log_file 2>&1 21 | else 22 | wget -NP $sublime_installer_path/src http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.1.tar.bz2 >> $log_file 2>&1 23 | fi 24 | echo -e "==> done..." 25 | 26 | echo -e "\n=> Extracting..." 27 | tar -C $sublime_installer_path -xjf $sublime_installer_path/src/Sublime*.tar.bz2 >> $log_file 2>&1 28 | echo -e "==> done..." 29 | 30 | echo -e "\n=> Creating symbolic link..." 31 | sudo ln -s $sublime_installer_path/Sublime\ Text\ 2/sublime_text /usr/local/bin/sublime-text >> $log_file 2>&1 32 | echo -e "==> done..." 33 | 34 | elif [[ $whichSublime -eq 2 ]] ; then 35 | 36 | echo -e "\nUsing apt-get for package installation\n" 37 | 38 | echo -e "\n=> Adding Sublime Text Editor 2 as a ppa..." 39 | echo -e "!!! You are about to add the following PPA to your system: !!!" 40 | echo -e "!!! Press [ENTER] to continue or ctrl-c to cancel adding it !!!" 41 | sudo add-apt-repository ppa:webupd8team/sublime-text-2 >> $log_file 2>&1 42 | echo -e "==> done..." 43 | 44 | echo -e "\n=> Download packages..." 45 | sudo apt-get update >> $log_file 2>&1 46 | echo -e "==> done..." 47 | 48 | echo -e "\n=> Installing Sublime Text Editor..." 49 | sudo apt-get install sublime-text >> $log_file 2>&1 50 | echo -e "==> done..." 51 | 52 | else 53 | 54 | echo -e "\n\n!!! You must choose between PPA or Portable version !!!" 55 | exit 1 56 | 57 | fi 58 | 59 | # Create .config folder opening welcome file 60 | cat > welcome < Downloading Package Control..." 111 | wget http://sublime.wbond.net/Package%20Control.sublime-package -NP $sublime_installer_path/src >> $log_file 2>&1 112 | echo -e "==> done..." 113 | 114 | echo -e "\n=> Unzipping Package Control..." 115 | cp $sublime_installer_path/src/Package* ~/.config/sublime-text-2/Installed\ Packages/ >> $log_file 2>&1 116 | echo -e "==> done..." 117 | fi 118 | 119 | # Ask for Emmet 120 | echo 121 | echo -n "Would you like the Emmet plugin [y/n]? " 122 | read zcplugin 123 | if [ $zcplugin = y -o $zcplugin = Y -o $zcplugin = yes -o $zcplugin = Yes -o $zcplugin = YES ] ; then 124 | echo -e "\n=> Downloading Emmet..." 125 | wget --no-check-certificate https://github.com/sergeche/emmet-sublime/archive/master.zip -NP $sublime_installer_path/src >> $log_file 2>&1 126 | echo -e "==> done..." 127 | 128 | echo -e "\n=> Unzipping Emmet..." 129 | unzip -o $sublime_installer_path/src/master -d ~/.config/sublime-text-2/Packages/ >> $log_file 2>&1 130 | echo -e "==> done..." 131 | fi 132 | --------------------------------------------------------------------------------