summaryrefslogtreecommitdiff
path: root/uninstalled-paths.sh
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.co.uk>2008-09-15 13:43:59 -0400
committerOlivier CrĂȘte <olivier.crete@collabora.co.uk>2008-09-15 13:43:59 -0400
commitd30c74ff21d005f50638f97f7178d12395cac5ff (patch)
tree92979ab27807aa8933bf77f2370f2779345fcdba /uninstalled-paths.sh
parent23b4a962a0084f529519167fb2753ed0bf048701 (diff)
downloadfarstream-d30c74ff21d005f50638f97f7178d12395cac5ff.tar.gz
Add uninstalled-paths.sh script
Diffstat (limited to 'uninstalled-paths.sh')
-rwxr-xr-xuninstalled-paths.sh39
1 files changed, 39 insertions, 0 deletions
diff --git a/uninstalled-paths.sh b/uninstalled-paths.sh
new file mode 100755
index 00000000..5c563376
--- /dev/null
+++ b/uninstalled-paths.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+# Generate environment for using Farsight 2 from Git checkout.
+
+realpath_ ()
+{
+ ( cd $0 2>/dev/null; pwd )
+}
+
+pjoin ()
+{
+ a=$(realpath_ $1)
+ b="$2"
+
+ [ -z "$a" ] && { echo $b ; return ; }
+
+ if [ -z "$b" ]; then
+ # Existing path list is empty.
+ echo "$a"
+ elif ! echo "$b" | sed -e 's/:/\\n/g' | grep -q "^$a$"; then
+ # New path is not in path list.
+ echo "$a:$b"
+ else
+ # New path is already in path list.
+ echo "$b"
+ fi
+}
+
+p=$(realpath_ $(dirname $0))
+ppath="$FS_PLUGIN_PATH"
+
+echo export PYTHONPATH=`pjoin "$p/python/.libs" "$PYTHONPATH"`
+echo export GST_PLUGIN_PATH=`pjoin "$p/gst" "$GST_PLUGIN_PATH"`
+
+for i in `find $p/transmitters -maxdepth 1 -type d -exec basename '{}' ';'`; do
+ ppath=`pjoin "$p/transmitters/$i/.libs" "$ppath"`
+done
+
+echo "export FS_PLUGIN_PATH=$ppath"