File: wip.csh

package info (click to toggle)
wip 2p3-7
  • links: PTS
  • area: non-free
  • in suites: sarge
  • size: 3,192 kB
  • ctags: 893
  • sloc: ansic: 13,307; csh: 962; makefile: 122; sed: 92
file content (44 lines) | stat: -rwxr-xr-x 1,230 bytes parent folder | download | duplicates (5)
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
#! /bin/csh -f
#  Script to generate WIP hardcopies.
#  It assumes WIPBIN points to the directory where the WIP binary resides.
#  This script may be useful if the printer is not a PostScript device;
#  simply change the device name in the command below to the driver desired.
#  If the printing device is PostScript, why not try setting `doplot' to
#  true in wip.tex (see the file $WIPSRC/00README)?
#
#
set wipdevice = "/vps"
set binpath = "../.."
unset fileList
#
while ($#argv)
  if ("$argv[1]" == "-p") then
    shift
    set binpath = "$argv[1]"
  else if ("$argv[1]" == "-d") then
    shift
    set wipdevice = "$argv[1]"
  else if ($?fileList == 0) then
    set fileList = ( $argv[*] )
    break
  else
    echo "Illegal option -- $argv[1] -- provided."
    break
  endif
  shift
end
#
if ($?fileList == 0) then
  echo "Usage: $0 [-p binpath] [-d device] file [files...]"
  echo 'where binpath is the path to the WIP binary;'
  echo 'device is a legal WIP plotting device; and'
  echo 'file.wip is the name of the WIP plot file.'
  exit 1
endif
#
foreach i ($fileList)
    if ($i:e == 'wip') set i = $i:r
    echo $binpath/wip -x -d ${i}.ps${wipdevice} $i.wip
    $binpath/wip -x -d ${i}.ps${wipdevice} $i.wip
end
exit 0