source: branches/help/util/arb_fig

Last change on this file was 18809, checked in by westram, 3 years ago
  • increase allowed title length to 42 by
    • widening link-subwindows.
    • slightly increasing overall window size.
  • change/remove subwindow titles.
  • align left border items.
  • start xfig with active gridmode.
  • Property svn:executable set to *
File size: 761 bytes
Line 
1#!/bin/bash
2
3XFIG_OPTIONS="-autorefresh -startgridmode 2"
4
5editlines() {
6    IFS=" "
7    read FIG
8    while [ ! -z "$FIG" ]; do
9        # echo "FIG='$FIG'"
10        xfig ${XFIG_OPTIONS} $FIG &
11        read FIG
12    done
13}
14
15expandfig() {
16    local FNAME=${1%.fig}.fig
17    find $ARBHOME/lib/pictures -name "$FNAME"
18}
19
20expandfigs() {
21    expandfig $1
22    shift
23    if [ ! -z "$1" ]; then
24        expandfigs $*
25    fi
26}
27
28
29if [ -z "$ARBHOME" ]; then
30    echo '$ARBHOME not set'
31else
32    if [ -z "$1" ]; then
33        echo "Usage: arb_fig [xxx[.fig]]+"
34        echo "Edit all given figs using xfig"
35        echo "If a fig occurs multiple times, all get edited"
36    else
37        expandfigs $* | editlines
38        FIG=`find $ARBHOME/lib/pictures -name "$FNAME"`
39    fi
40fi
Note: See TracBrowser for help on using the repository browser.