source: tags/ms_r16q2/util/arb_fig

Last change on this file was 8740, checked in by westram, 12 years ago
  • script to edit .fig w/o specifying path
  • Property svn:executable set to *
File size: 699 bytes
Line 
1#!/bin/bash
2
3editlines() {
4    IFS=" "
5    read FIG
6    while [ ! -z "$FIG" ]; do
7        # echo "FIG='$FIG'"
8        xfig $FIG &
9        read FIG
10    done
11}
12
13expandfig() {
14    local FNAME=${1%.fig}.fig
15    find $ARBHOME/lib/pictures -name "$FNAME"
16}
17
18expandfigs() {
19    expandfig $1
20    shift
21    if [ ! -z "$1" ]; then
22        expandfigs $*
23    fi
24}
25
26
27if [ -z "$ARBHOME" ]; then
28    echo '$ARBHOME not set'
29else
30    if [ -z "$1" ]; then
31        echo "Usage: arb_fig [xxx[.fig]]+"
32        echo "Edit all given figs using xfig"
33        echo "If a fig occurs multiple times, all get edited"
34    else
35        expandfigs $* | editlines
36        FIG=`find $ARBHOME/lib/pictures -name "$FNAME"`
37    fi
38fi
Note: See TracBrowser for help on using the repository browser.