Forked from collindonnell/Octopress Publish.applescript
Created
March 8, 2013 14:04
-
-
Save Temikus/5116627 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(* | |
Generate and deploy Octopress site from Launchbar | |
Author: Collin Donnell | |
Website: http://collindonnell.com | |
Date: 01/07/2013 | |
*) | |
-- Set to the location on disk of your site | |
set octopressLocation to ((path to home folder as text) & "Code:blog:") as alias | |
-- Set to the URL of your website | |
set websiteURL to "http://collindonnell.com" | |
-- "true" if you want the site to open after publishing, "false" if not | |
set openWebsiteWhenFinished to true | |
tell application "Terminal" | |
activate | |
-- Run gen_deploy in the root folder of the octopress site | |
do script "cd " & quoted form of (POSIX path of octopressLocation) & "; rake gen_deploy" | |
-- Wait for the Terminal window to finish what it's doing | |
repeat while window 1 is busy | |
delay 0.25 | |
end repeat | |
-- Close the Terminal window | |
close window 1 | |
end tell | |
-- Show a notification | |
-- Comment this out if you don't have LaunchBar installed | |
tell application "LaunchBar" to display in notification center websiteURL with title "Published Octopress Site" | |
if openWebsiteWhenFinished then | |
-- Change to your favorite browser | |
tell application "Safari" | |
activate | |
tell window 1 | |
set current tab to (make new tab with properties {URL:websiteURL}) | |
end tell | |
end tell | |
end if |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment