Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script to Copy to /Library/Services #3

Open
JMichaelTX opened this issue Jun 22, 2016 · 1 comment
Open

Script to Copy to /Library/Services #3

JMichaelTX opened this issue Jun 22, 2016 · 1 comment

Comments

@JMichaelTX
Copy link

Hi. Many thanks for providing a great tool for those of us who don't want to use Terminal for this task.

Here's an AppleScript that will copy the SymbolicLinker.service file to the /Library/Services folder, making it even easier for the user to install. Perhaps you could incorporate this into you next build / dmg?

Just place this script in the same folder that you save the SymbolicLinker.service file to, and run the script. It wil ask for confirmation to copy.

use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions

set scriptPath to path to me
tell application "System Events" to set folderPath to path of container of disk item (scriptPath as text)
set filePath to folderPath & "SymbolicLinker.service"

tell application "Finder"
  set sourceAlias to alias filePath
  set destFolder to alias POSIX file "/Library/Services"
  set CR to return
  set msgStr to "CONFIRM:" & CR & CR & "COPY: " & CR & sourceAlias ¬
    & CR & CR & "TO: " & destFolder
  set titleStr to name of me

  display dialog msgStr ¬
    with title titleStr ¬
    buttons {"Cancel", "OK"} ¬
    default button ¬
    "OK" cancel button ¬
    "Cancel" with icon caution

  duplicate sourceAlias to destFolder
  open destFolder

end tell
@danielbayley
Copy link

Surely something like cp SymbolicLinker.service ~/Library/Services would be easier?! Anyway you can install this utility with homebrew-cask: brew cask install symboliclinker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants