• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: In an automator shell script, discovering the path to the application (James C)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: In an automator shell script, discovering the path to the application (James C)


  • Subject: RE: In an automator shell script, discovering the path to the application (James C)
  • From: Geoff Dillberg <email@hidden>
  • Date: Mon, 19 Dec 2011 20:32:06 +0000
  • Acceptlanguage: en-US, en-GB
  • Thread-topic: In an automator shell script, discovering the path to the application (James C)

Hi James,

I've done similar to what you're attempting.
I needed a third-party action: Get Parent Folder
http://mac.softpedia.com/get/Automator-Actions---Workflows/Get-Parent-Folder.shtml

You'll need to do a "Get Finder Items" on your app in order to feed the results "Get Parent Folder"
Then save those results to a Set Variable (I forget the whole name of that action)
Then before you run your shell script do a Get Variable
Then in your Run Shell Script action 'pass input' pulldown, choose 'as arguments' or 'to stdin' depending on your needs.

My applet is basically a Automator wrapper around a ruby shell script that acts on a folder, and generates an HTML report in the same folder as the input folder.

You can contact me directly at:
email@hidden (hopefully you won't get spam filtered by my corporate email server)
email@hidden  (personal email, but I don't check it every day, so I may not respond quickly)

Hope this helps,
Geoff

________________________________________
From: automator-users-bounces+geoff.dillberg=email@hidden [automator-users-bounces+geoff.dillberg=email@hidden] On Behalf Of email@hidden [email@hidden]
Sent: Monday, December 05, 2011 12:00 PM
To: email@hidden
Subject: Automator-users Digest, Vol 71, Issue 2

Send Automator-users mailing list submissions to
        email@hidden

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.apple.com/mailman/listinfo/automator-users
or, via email, send a message with subject or body 'help' to
        email@hidden

You can reach the person managing the list at
        email@hidden

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Automator-users digest..."


Today's Topics:

   1. In an automator shell script,     discovering the path to the
      application (James C)


----------------------------------------------------------------------

Message: 1
Date: Mon, 05 Dec 2011 22:54:15 +1300
From: James C <email@hidden>
Subject: In an automator shell script,  discovering the path to the
        application
To: email@hidden
Message-ID:
        <CACZ9Q6heHOeh60u=V7o1eAGjFXHVqRZBkcT8EX=email@hidden>
Content-Type: text/plain; charset=ISO-8859-1

Hi All,

I'm trying to wrap an automator app around an existing complicated
thing, which has a shell script to start it, then a bunch of other
files; eg an executable and some shared libraries.

The complicated thing currently builds with cmake; converting it to
build with xcode is almost certainly beyond me.

My app has a shell-script step, which seems to behave sensibly.

What I don't have is a way of discovering where in the file-system the
app is, so I can use that to build paths to the executable and
libraries.

Does any of you know how to do this?

Regards,
James the newbie


------------------------------

_______________________________________________
Automator-users mailing list
email@hidden
http://lists.apple.com/mailman/listinfo/automator-users


End of Automator-users Digest, Vol 71, Issue 2
********************************************** _______________________________________________
Do not post admin requests to the list. They will be ignored.
Automator-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: desperately need help using automator to open sparse image file
  • Next by Date: Re: Automator-users Digest, Vol 71, Issue 8
  • Previous by thread: desperately need help using automator to open sparse image file
  • Next by thread: RE: In an automator shell script, discovering the path to the application (James C)
  • Index(es):
    • Date
    • Thread