a script running a script

Come up with a useful post-processing script? Share it here!
Post Reply
pow
Newbie
Newbie
Posts: 3
Joined: August 14th, 2009, 4:10 pm

a script running a script

Post 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
rAf
Moderator
Moderator
Posts: 546
Joined: April 28th, 2008, 2:35 pm
Location: France
Contact:

Re: a script running a script

Post 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
doubledrat
Release Testers
Release Testers
Posts: 180
Joined: February 20th, 2008, 3:16 pm

Re: a script running a script

Post 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
pow
Newbie
Newbie
Posts: 3
Joined: August 14th, 2009, 4:10 pm

Re: a script running a script

Post by pow »

It did! Thanks a lot!
Post Reply