source: trunk/util/arb_fig

Last change on this file was 19532, checked in by westram, 2 weeks ago
  • reintegrates 'help' into 'trunk'
    • tweak arb documentation:
      • automatically link
        • ticket references to arb bug tracker (only affects html version).
        • found URLs.
      • page titles
        • warn about long titles.
        • introduce SUBTITLEs (automatically triggered by multi-line titles in source files).
        • increase allowed length (limited by subwindow width).
      • cleanup header sections in all helpfiles.
      • fix and/or update several help files.
      • document syntax of help sources.
      • build issues:
        • when xml validation fails, next build no longer uses invalid xml ⇒ keeps failing.
        • remove output files on error (including files below ARBHOME/lib).
        • pipe output through logs to ensure proper wrapping in Entering/Leaving lines.
    • moves Tree admin + NDS menu entries to top of menu
  • adds: log:branches/help@18783:19531
  • 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.