Skip to content

Instantly share code, notes, and snippets.

@kikaigyo
Created October 22, 2012 15:14
Show Gist options
  • Save kikaigyo/3931965 to your computer and use it in GitHub Desktop.
Save kikaigyo/3931965 to your computer and use it in GitHub Desktop.
シンボリックリンクを作成するAppleスクリプト。Automataのサービスでつかう。
on run {input, parameters}
(* Your script goes here *)
tell application "Finder"
set theinput to item 1 of input as alias
set theInfo to info for theinput
set theName to name of theInfo
set inpath to "\"" & (POSIX path of ¬
(theinput)) & "\""
choose folder with prompt "Choose Destination Folder"
set outpath to "\"" & (POSIX path of ¬
(result)) & theName & "\""
end tell
do shell script "ln -s " & inpath & " " & outpath
return input
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment