Skip to content

Instantly share code, notes, and snippets.

@nitschmann
Last active December 22, 2015 15:29
Show Gist options
  • Save nitschmann/6493097 to your computer and use it in GitHub Desktop.
Save nitschmann/6493097 to your computer and use it in GitHub Desktop.
Script to install Sublime Text 2 'subl' command for your terminal on Mac OS X
# !/bin/sh
user="$(whoami)"
bin_dir="/Users/$user/bin"
if [ ! -d "$bin_dir" ]
then
echo "Create directory $bin_dir\n"
mkdir "$bin_dir"
fi
command_line="/Applications/Sublime Text 2.app/Contents/SharedSupport/bin"
if [ -d "$command_line" ]
then
echo "Create symbolic link"
ln -s "$command_line/subl" $bin_dir
else
echo 'Sublime Text 2 App is not installed!'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment