dotfiles/setup/sublime-packages.sh

37 lines
841 B
Bash
Raw Normal View History

2012-10-16 12:17:12 +00:00
#!/bin/bash
2012-10-16 12:11:28 +00:00
# Installs/updates Sublime packages
#
# 1. Installs Package Control (all plugins listed in `Package Control.sublime-settings` will be installed after Sublime restarts).
# 2. Installs some packages from GitHub.
2012-10-15 13:20:56 +00:00
if [ `uname` == 'Darwin' ]; then
2012-10-16 12:11:28 +00:00
cd ~/Library/Application\ Support/Sublime\ Text\ 2/Installed\ Packages
2012-10-15 13:20:56 +00:00
else
2012-10-16 12:11:28 +00:00
cd ~/AppData/Roaming/Sublime\ Text\ 2/Installed\ Packages
2012-10-15 13:20:56 +00:00
fi
2012-10-16 12:11:28 +00:00
#
# Package Control
#
[ ! -f Package\ Control.sublime-package ] && curl -o Package\ Control.sublime-package http://sublime.wbond.net/Package%20Control.sublime-package
#
# GitHub
#
cd ../Packages
2012-10-15 13:20:56 +00:00
# Hayaku Bundle
if [ -d ./hayaku ]; then
echo "Updating Hayaku Bundle..."
cd hayaku
git pull
git submodule update
cd ..
else
echo "Installing Hayaku Bundle..."
git clone -b sublime-master git://github.com/hayaku/hayaku.git --recursive
fi