Re: [PD] [shell] - shell scripts on osx, solved !

2018-04-20 Thread IOhannes m zmoelnig
On 2018-04-20 11:50, oliver wrote:
> 
> your first answer pointed to the right direction.
> i found the solution after digging a bit more in the archives:
> 
> for non-native executables (FFPLAY in my case) you need to provide
> absolute paths in the shell scripts.

i figure this just a PATH issue (PATH missing "/usr/local/bin")

for interactive shells (which is what you get by opening Terminal.app),
this seems to be automatically handled by ~/.bashrc.
at least mine (on an OSX machine) looks like:

~~~
# only run in interactive mode:
[ -z "$PS1" ] && return

export CVS_RSH=ssh
export PATH=${PATH}:/usr/local/bin
if [  "x${EDITOR}" = "x" ]
then
 export EDITOR=/usr/bin/vi
fi
~~~

which makes it clear that non-interactive shells (and non-bash) shells
do not get the merits of /usr/local/bin/...

you could:
- call programs by absolute paths (which is what you already do; it's
somewhat ugly as it breaks everything if the paths ever change)
- add something like "PATH=/usr/local/bin:${PATH}" at the beginning of
your script (after the hashbang) and don't worry any more.
- add /usr/local/bin to your global search paths. e.g. [1].

fgmasdrt
IOhannes

[1] https://docs.brew.sh/FAQ#my-mac-apps-dont-find-usrlocalbin-utilities



signature.asc
Description: OpenPGP digital signature
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] [shell] - shell scripts on osx

2018-04-19 Thread IOhannes m zmölnig
On 04/19/2018 02:39 PM, oliver wrote:
> hi, again something where i am stuck ...
> 
> i am trying to get a simple bash script to run on OS X using ggee's
> shell object.
> 
> 
> unfortunately, when sending it the corresponding message, [shell]
> doesn't seem to do anything. while simple commands like "ls" etc. work
> and output a result (out the left outlet), i can't seem to be able to
> run a (executable) .sh file that runs nicely when called from a terminal.
> 
> what's more:
> 
> even a simple output redirecting command like
> 
> ls -la > ./output.txt
> 
> 
> doesn't do anything apart from sending "1" out the right outlet.

hmm, redirection is actually *not* the simplest test case.
and getting a 1 indicates a problem.

you probably should check the terminal for errors (the help-patch
erroneously speaks of the "Pd console"; back in the days when [shell]
was written, the Pd console was indeed the terminal window.)

also, you and [shell] might have different opinions about what the
current directory ("./") means.
try using full paths.

[/Users/oliver/Documents/Scripts/runme.sh(

[ls -la > /tmp/output.txt(

> can anybody help or is there another way to run shell scripts from
> within PD on OSX ?

i don't know anything about OSX, but my advice should be generic enough...

gfmdsar
IOhannes



signature.asc
Description: OpenPGP digital signature
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


[PD] [shell] - shell scripts on osx

2018-04-19 Thread oliver

hi, again something where i am stuck ...

i am trying to get a simple bash script to run on OS X using ggee's 
shell object.



unfortunately, when sending it the corresponding message, [shell] 
doesn't seem to do anything. while simple commands like "ls" etc. work 
and output a result (out the left outlet), i can't seem to be able to 
run a (executable) .sh file that runs nicely when called from a 
terminal.


what's more:

even a simple output redirecting command like

ls -la > ./output.txt


doesn't do anything apart from sending "1" out the right outlet.


can anybody help or is there another way to run shell scripts from 
within PD on OSX ?


best

oliver

___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list