Skip to content

Commit

Permalink
Merge pull request supertopher#8 from supertopher/install-script
Browse files Browse the repository at this point in the history
Added tests to ensure we don't try to delete a file that doesn't exist
  • Loading branch information
supertopher committed Feb 3, 2014
2 parents ee791c0 + 3eab15a commit 03f0fd4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sublimelink
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/bin/sh

test -d /Applications/Sublime\ Text\ 2.app/ && {
rm /usr/local/bin/subl
test /usr/local/bin/subl && rm /usr/local/bin/subl
ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl
exit 0
}

test -d /Applications/Sublime\ Text.app/ && {
rm /usr/local/bin/subl
test /usr/local/bin/subl && rm /usr/local/bin/subl
ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl
exit 0
}
Expand Down

0 comments on commit 03f0fd4

Please sign in to comment.