File: display_script

package info (click to toggle)
acedb 4.9.39%2Bdfsg.02-9
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 33,948 kB
  • sloc: ansic: 256,972; perl: 2,803; cpp: 2,534; csh: 1,712; python: 862; sh: 658; makefile: 299; awk: 249; lex: 225; yacc: 221
file content (32 lines) | stat: -rw-r--r-- 947 bytes parent folder | download | duplicates (6)
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
#!sh
# $Id: display_script,v 1.2 1997/04/28 12:31:25 rd Exp $ 

# NOTE the #! line above. There will not in general exist /bin/sh
# But the acedb distribution includes sh.exe, which will be on the 
# path, so the form above will run that. The current distribution
# doesn't include any other interpreters, so all scripts had better
# be written in sh

# winaceshell is also on the path, it takes arg1 and converts  it into
# a windows path, then gives it to the windows shell to open.
# So as long as windows knows how to display .jpegs (in this case)
# All is hunky-dory

# The worm database seems to be schizoid about weather to include
# the .jpeg extension or not, so we cover all the bases.

if [ -e "$ACEDB"/pictures/$1 ]
then
    winaceshell "$ACEDB"/pictures/$1
fi

if [ -e "$ACEDB"/pictures/$1.jpeg ] 
then
    winaceshell "$ACEDB"/pictures/$1.jpeg
fi


if [ -e "$ACEDB"/pictures/$1.jpg ]
then
    winaceshell "$ACEDB"/pictures/$1.jpg
fi