Running Node (or any unix cmd line program) from Shell from a LC Stack
david at viral.academy
Mon May 9 23:52:20 CEST 2016
Yes - the way i see this is a combination of tools that help, and manual.
So we have some scripts which check common places and find / suggest things
to add. Then we have the ability to customise and add our own by hand. We
save these to a preference file, and load them when we start Livecode. That
way it should sort of just work for most use cases, but you can always add
things by hand.
It's also a nice way to teach people where to find these things. The
interface can offer the option to open folders, and / or peak at files.
On 9 May 2016 at 22:01, [-hh] <hh at hh.on-rev.com> wrote:
> David B. wrote
> > Yes - here is the handler you need:
> > command bash_AddSystemPathsToPATH
> > if the platform = "MacOS" then -- and it is recent ???
> > put url "file:/etc/paths" into systemPaths
> > put token 1 to -1 of systemPaths into systemPathArray
> > put $PATH into revPATH
> > replace ":" with CR in revPATH
> > put systemPathArray & CR & revPATH into combinedPath
> > sort combinedPath
> > put token 1 to -1 of combinedPath into combinedPath
> > split combinedPath with CR and ":"
> > put keys (combinedPath) into newPathIndex
> > replace CR with ":" in newPathIndex
> > put newPathIndex into $PATH
> > end if
> > return $PATH
> > end bash_AddSystemPathsToPATH
> > You want to use the above script on startup to automatically
> > configure your $PATH in Livecode for things like "brew" and npm.
> Clever script.
> But who knows to which file Apple's launchctl writes environments vars?
> And who knows which 'path-file' LC uses at startup for it's $PATH?
> So I would like to propose *moreover* to ensure that /usr/local/bin
> is added to $PATH ( I have here the paths:
> /usr/local/bin/brew and /usr/local/bin/npm )
> View this message in context:
> Sent from the Revolution - User mailing list archive at Nabble.com.
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the use-livecode