File: img_layout

package info (click to toggle)
ctn 3.2.0~dfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 15,420 kB
  • sloc: ansic: 179,553; makefile: 7,002; java: 1,863; csh: 1,067; yacc: 523; sh: 424; cpp: 394; sql: 389; lex: 170
file content (116 lines) | stat: -rw-r--r-- 3,277 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#!/bin/csh
#
# Intent:	This script creates the layout for an imaging demonstration
# $Revision: 1.3 $

echo This script is used to create a layout for the imaging demonstration
echo with MIR software.  This is not necessarily the final layout, but it
echo will serve for testing purposes.  This script is picky about input
echo so please type carefully \(avoid extra spaces when you type\).
echo ""

set ROOT = /mir_ctn
echo The default root directory for the MIR CTN data files is $ROOT.
echo You can choose a different directory at this point by entering
echo the directory name.  If you wish to use the default, just hit RETURN.
echo ""
set a = $<
if ($a != "") then
echo Do you wish to use $a as the root directory "(y/n)?"
set b = $<
if (($b != "y") && ($b != "Y")) then
echo Script exiting.  Please try again.
exit
endif
set ROOT = $a
endif

if (! (-e $ROOT)) then
echo This script requires the directory $ROOT to exist before running.
echo Please create this directory and then run this script again.
exit
endif

umask 0
# Create several subdirectories for the imaging demonstration

echo Making the imaging subdirectories starting from $ROOT
set I = $ROOT/img/db
if (! (-e $ROOT/img)) then
mkdir $ROOT/img
endif
if (! (-e $ROOT/img/config)) then
mkdir $ROOT/img/config
endif
if (! (-e $ROOT/img/db)) then
mkdir $ROOT/img/db
endif
if (! (-e $ROOT/img/q)) then
mkdir $ROOT/img/q
endif

# Now make the common directory and the directories for
# individual vendors.

echo Making the common directory.
if (! (-e $I/common)) then
mkdir $I/common
endif

echo Making public and private directories for each vendor.
echo If the directories already exist, they are not recreated.
echo ""

foreach i (3m aaai acuson adac agfa ali atl cemax dupont gems isg kodak)
echo $i $i"_prv1" $i"_prv2" $i"_pub"
if (! (-e $I/$i"_prv1")) then
mkdir $I/$i"_prv1"
endif
if (! (-e $I/$i"_prv2")) then
mkdir $I/$i"_prv2"
endif
if (! (-e $I/$i"_pub")) then
mkdir $I/$i"_pub"
endif
end

foreach i (konica loral merge mitra philips picker siemens star)
echo $i $i"_prv1" $i"_prv2" $i"_pub"
if (! (-e $I/$i"_prv1")) then
mkdir $I/$i"_prv1"
endif
if (! (-e $I/$i"_prv2")) then
mkdir $I/$i"_prv2"
endif
if (! (-e $I/$i"_pub")) then
mkdir $I/$i"_pub"
endif
end

echo ""
echo This step will now create empty databases in the directories you
echo specify.  This is not a mandatory step.  As you send images to
echo the img_server program, it will automatically create databases.
echo You may choose to do this to create your database files or to create
echo empty database files for other vendors.  You will enter one company
echo name per line.

set a = "none"
while ($a != "quit")
echo ""
echo Enter one of these company names \(or quit\)
echo 3m aaai acuson adac agfa ali atl cemax dupont gems isg kodak
echo konica loral merge mitra philips picker siemens star
echo  ""
set a = $<
if ((-e $I/$a"_prv1") && (-e $I/$a"_prv2") && (-e $I/$a"_pub")) then
echo Now creating public and private databases for $a
dbnew $I/$a"_pub"/db
dbnew $I/$a"_prv1"/db
dbnew $I/$a"_prv2"/db
else if ($a != "quit") then
echo Could not create public and private databases because one or more
echo directies did not exist.  Please reenter company name and/or check
echo that the image directories were created properly.
endif