Page 1 of 1

a script running a script

Posted: August 14th, 2009, 4:19 pm
by pow
I'm not sure if this is possible but I'm trying to run the following command on my linux server:

user@server:/movies/yamj$ ./MovieJukebox.sh libraries.xml -c -o ./

The script is as you can see in the /movies/yamj dir and the command only works if I start it from inside that dir. Is there any way to get sabnzbd to run this script after downloading?
I've been trying for a while but can't seem to get it done

regards

Re: a script running a script

Posted: August 14th, 2009, 6:03 pm
by rAf
I'm not a scripting specialist but maybe this will work :

Code: Select all

#!/bin/bash
CURRENT_DIR=`pwd`
cd /movies/yamj
./MovieJukebox.sh libraries.xml -c -o $CURRENT_DIR

Re: a script running a script

Posted: August 15th, 2009, 3:03 am
by doubledrat
I don't think that will work as the current dir in the example is the script dir.  just

Code: Select all

#!/bin/bash
cd /movies/yamj
./MovieJukebox.sh libraries.xml -c -o ./
should do it

Re: a script running a script

Posted: August 16th, 2009, 7:02 am
by pow
It did! Thanks a lot!