File: fillImageDBScript

package info (click to toggle)
ctn 3.2.0~dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 15,336 kB
  • ctags: 21,262
  • sloc: ansic: 179,501; makefile: 7,004; java: 1,863; csh: 1,067; yacc: 523; sh: 424; cpp: 394; sql: 389; lex: 170
file content (32 lines) | stat: -rw-r--r-- 670 bytes parent folder | download | duplicates (9)
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
#!/bin/csh
# This script is used to fill the image db with the images
# submitted by vendors for RSNA95.  It assumes a certain
# directory layout.
# Usage is: fillImageDBScript directory database
# where: directory is the directory holding the studies to be placed
#	 in the image database (by vendor).
#	 database is the name of the image DB to hold the image information.

if ($2 == "") then
echo "Usage: $0 directory database"
goto abort
endif

cd $1
foreach i (*)
 echo $i
 if (-d $i) then
  fillImageDB -o $i $2 $1/$i/*/*
  if ($status != 0) then
   echo fillImageDB failed
   goto abort
  endif
 else
  echo $i is not a directory
 endif
end

exit 0

abort:
exit 1