|
Last change
on this file was
18650,
checked in by westram, 4 years ago
|
- start xfig in autorefresh mode.
|
-
Property svn:executable set to
*
|
|
File size:
742 bytes
|
| Line | |
|---|
| 1 | #!/bin/bash |
|---|
| 2 | |
|---|
| 3 | XFIG_OPTIONS=-autorefresh |
|---|
| 4 | |
|---|
| 5 | editlines() { |
|---|
| 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 | |
|---|
| 15 | expandfig() { |
|---|
| 16 | local FNAME=${1%.fig}.fig |
|---|
| 17 | find $ARBHOME/lib/pictures -name "$FNAME" |
|---|
| 18 | } |
|---|
| 19 | |
|---|
| 20 | expandfigs() { |
|---|
| 21 | expandfig $1 |
|---|
| 22 | shift |
|---|
| 23 | if [ ! -z "$1" ]; then |
|---|
| 24 | expandfigs $* |
|---|
| 25 | fi |
|---|
| 26 | } |
|---|
| 27 | |
|---|
| 28 | |
|---|
| 29 | if [ -z "$ARBHOME" ]; then |
|---|
| 30 | echo '$ARBHOME not set' |
|---|
| 31 | else |
|---|
| 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 |
|---|
| 40 | fi |
|---|
Note: See
TracBrowser
for help on using the repository browser.