diff options
author | Tom Rondeau | 2011-01-04 12:04:00 -0500 |
---|---|---|
committer | Tom Rondeau | 2011-01-04 12:04:00 -0500 |
commit | f7ba4702a44213e3bc03c41ea0c4eb1f02f230c7 (patch) | |
tree | 48148f9db0b47ee14e0e7eea82e174cf9c82ebf4 /gnuradio-core/src/guile/gr-run-waveform-script.in | |
parent | 99c2b220675f3ca73ef5cf0a9ebe03706f813d61 (diff) | |
parent | 66768f6ec30edbc2cf481e16b92a387b483dde6c (diff) | |
download | gnuradio-f7ba4702a44213e3bc03c41ea0c4eb1f02f230c7.tar.gz gnuradio-f7ba4702a44213e3bc03c41ea0c4eb1f02f230c7.tar.bz2 gnuradio-f7ba4702a44213e3bc03c41ea0c4eb1f02f230c7.zip |
Merge branch 'next' of gnuradio.org:gnuradio into next
Diffstat (limited to 'gnuradio-core/src/guile/gr-run-waveform-script.in')
-rw-r--r-- | gnuradio-core/src/guile/gr-run-waveform-script.in | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/gnuradio-core/src/guile/gr-run-waveform-script.in b/gnuradio-core/src/guile/gr-run-waveform-script.in new file mode 100644 index 000000000..651b387e9 --- /dev/null +++ b/gnuradio-core/src/guile/gr-run-waveform-script.in @@ -0,0 +1,51 @@ +#!/bin/sh + +# usage: prepend <path-varname> <dir> +prepend() { + if [ $# -ne 2 ] + then + echo "$0: prepend needs 2 args" 1>&2 + exit 1 + fi + local path="$1" dir="$2" contents="" + eval "contents=\$$path" + if [ "$dir" != "" ] + then + if [ "$contents" = "" ] + then + eval "$path=\"$dir\"" + else + eval "$path=\"$dir:$contents\"" + fi + fi + #echo end-of-prepend: $path=${!path} +} + +prefix="@prefix@" +exec_prefix="@exec_prefix@" + +prepend GUILE_LOAD_PATH "${prefix}/share/guile/site" +prepend LTDL_LIBRARY_PATH "@libdir@" +prepend DYLD_LIBRARY_PATH "@libdir@" + +export GUILE_LOAD_PATH LTDL_LIBRARY_PATH DYLD_LIBRARY_PATH + +export GUILE_WARN_DEPRECATED="no" + +exec @GUILE@ -e main -s $0 "$@" +!# + +;;; Load and run a waveform defined with define-waveform +;;; +;;; usage: gr-run-waveform filename.wfd [args...] + +(load-from-path "gnuradio/run-waveform") + +(define (main args) + (if (not (>= (length args) 2)) + (let ((port (current-error-port))) + (display "usage: " port) + (display (car args) port) + (display " filename.wfd [args...]\n" port) + (exit 1))) + (apply run-waveform (cdr args))) |