diff options
author | Stefan Kost <ensonic@users.sf.net> | 2011-04-19 15:09:54 -0400 |
---|---|---|
committer | Stefan Kost <ensonic@users.sf.net> | 2011-04-26 03:42:55 -0400 |
commit | a161f901ebd621de04a40ebb0c51dab760e261ab (patch) | |
tree | b3b5bec982454b4b91c61379021e5d156ee14ebf /tools | |
parent | 9f38ae9227608449143ae7bf671f1823cbdbec09 (diff) | |
download | gstreamer-plugins-bad-a161f901ebd621de04a40ebb0c51dab760e261ab.tar.gz |
element-maker: allow to run from a different working directory
Get the dirname for the script and use that to reference the templates. Use the
templatedir variable to check for templates.
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/gst-element-maker | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/gst-element-maker b/tools/gst-element-maker index 777df1262..6db321d5b 100755 --- a/tools/gst-element-maker +++ b/tools/gst-element-maker @@ -2,7 +2,8 @@ prefix=gst -templatedir=element-templates +basedir=`dirname $0` +templatedir=$basedir/element-templates while [ "$1" ] ; do case $1 in @@ -44,7 +45,7 @@ if [ "$name" = "" -o "$class" = "" ] ; then exit 1 fi -if [ ! -f "element-templates/$class" ] ; then +if [ ! -f "$templatedir/$class" ] ; then echo "Template file for $class not found." exit 1 fi |