File: make_plots

package info (click to toggle)
libtioga-ruby 1.8-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 9,956 kB
  • ctags: 3,257
  • sloc: ansic: 31,801; ruby: 16,346; sh: 172; makefile: 114
file content (49 lines) | stat: -rwxr-xr-x 806 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/sh

# A small script to produce all figures from an irb file.
# Copyright Vincent Fourmond 2006.
# It can be used and redistributed under the conditions of the LGPL version
# 2.1, see file lgpl.txt in the main directory.
set -e

while test "$1" ; do 
    case $1 in
	--viewer)
	    shift
	    VIEWER=$1
	    VIEW=1
	    ;;
	--view)
	    VIEW=1
	    ;;
	*)
	    break;
	    ;;
    esac
    shift
done;

while test "$1"; do
    DIR=`dirname $1`
    echo "Going to directory $DIR"
    cd $DIR;
    NAME=`basename $1`
    if test "$VIEW"; then
	CMD="preview_all"
    else
	CMD="make_all"
    fi;
    if test "$VIEWER"; then
	CMD2='$open_command'"='$VIEWER'"
    else
	CMD2=""
    fi;
    cat - <<EOF | ruby -r Tioga/irb_tioga
include Tioga::IRB_Tioga
ld '$NAME'
$CMD2
$CMD
EOF
    cd -;
    shift;
done;