-
Notifications
You must be signed in to change notification settings - Fork 39
/
configure
169 lines (136 loc) · 5.68 KB
/
configure
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
#!/bin/bash
##############################################################################
# Simple script to configure, compile (and if you're 'root', install) SPLAT! #
# and associated utilities. Written by John A. Magliacane, KD2BD May 2002 #
# Last update: September 2009 #
##############################################################################
ans=""
whoami=`whoami`
until [ "$ans" = "2" ] || [ "$ans" = "3" ] || [ "$ans" = "4" ] || [ "$ans" = "5" ] || [ "$ans" = "6" ] || [ "$ans" = "7" ] || [ "$ans" = "8" ]; do
clear
echo
echo -e "\t ******************************************************"
echo -e "\t ** SPLAT! Standard Resolution Mode Configuration **"
echo -e "\t ******************************************************\n"
echo -e "\t Please select the Maximum Analysis Region capability"
echo -e "\t you would like SPLAT! to possess when operating in"
echo -e "\t 3 arc-second (standard) resolution mode based on"
echo -e "\t the amount of free memory available for SPLAT!:\n"
echo -e "\t Maximum Analysis Region RAM + Swap Requirement"
echo -e "\t ====================================================\n"
echo -e "\t (2) 2 x 2 Degrees --------- 25 Megabytes minimum"
echo -e "\t (3) 3 x 3 Degrees --------- 52 Megabytes minimum"
echo -e "\t (4) 4 x 4 Degrees --------- 95 Megabytes minimum"
echo -e "\t (5) 5 x 5 Degrees --------- 145 Megabytes minimum"
echo -e "\t (6) 6 x 6 Degrees --------- 210 Megabytes minimum"
echo -e "\t (7) 7 x 7 Degrees --------- 285 Megabytes minimum"
echo -e "\t (8) 8 x 8 Degrees --------- 370 Megabytes minimum\n"
echo -n "Your choice: "
read ans
done
# Build std-parms.h file that will be copied into splat.h at compilation time
echo "/*" > std-parms.h
echo " Parameters for 3 arc-second standard resolution mode of operation" >> std-parms.h
echo -e " Generated by $0 by "$whoami" on "`date`"\n*/" >> std-parms.h
echo "#define HD_MODE 0" >> std-parms.h
if [ "$ans" = "2" ]; then
echo "#define MAXPAGES 4" >> std-parms.h
fi
if [ "$ans" = "3" ]; then
echo "#define MAXPAGES 9" >> std-parms.h
fi
if [ "$ans" = "4" ]; then
echo "#define MAXPAGES 16" >> std-parms.h
fi
if [ "$ans" = "5" ]; then
echo "#define MAXPAGES 25" >> std-parms.h
fi
if [ "$ans" = "6" ]; then
echo "#define MAXPAGES 36" >> std-parms.h
fi
if [ "$ans" = "7" ]; then
echo "#define MAXPAGES 49" >> std-parms.h
fi
if [ "$ans" = "8" ]; then
echo "#define MAXPAGES 64" >> std-parms.h
fi
ans=""
until [ "$ans" = "0" ] || [ "$ans" = "1" ] || [ "$ans" = "2" ] || [ "$ans" = "3" ] || [ "$ans" = "4" ] || [ "$ans" = "5" ] || [ "$ans" = "6" ] || [ "$ans" = "7" ] || [ "$ans" = "8" ]; do
clear
echo
echo -e "\t ******************************************************"
echo -e "\t ** SPLAT! HD High Resolution Mode Configuration **"
echo -e "\t ******************************************************\n"
echo -e "\t Please select the Maximum Analysis Region capability"
echo -e "\t you would like SPLAT! to possess when operating in"
echo -e "\t 1 arc-second (HD) resolution mode based on the amount"
echo -e "\t of free memory available for SPLAT! Selections 6, 7,"
echo -e "\t and 8 are suitable for 64-BIT SYSTEMS ONLY:\n"
echo -e "\t Maximum Analysis Region RAM + Swap Requirement"
echo -e "\t ====================================================\n"
echo -e "\t (1) 1 x 1 Degrees --------- 52 Megabytes minimum"
echo -e "\t (2) 2 x 2 Degrees --------- 225 Megabytes minimum"
echo -e "\t (3) 3 x 3 Degrees --------- 468 Megabytes minimum"
echo -e "\t (4) 4 x 4 Degrees --------- 855 Megabytes minimum"
echo -e "\t (5) 5 x 5 Degrees --------- 1305 Megabytes minimum"
echo -e "\t (6) 6 x 6 Degrees --------- 1890 Megabytes minimum"
echo -e "\t (7) 7 x 7 Degrees --------- 2565 Megabytes minimum"
echo -e "\t (8) 8 x 8 Degrees --------- 3330 Megabytes minimum"
echo -e "\t (0) None of the above. Do not build SPLAT! HD.\n"
echo -n "Your choice: "
read ans
done
if [ "$ans" != "0" ]; then
# Build hd-parms.h file that will be copied into splat.h at compilation time
echo "/*" > hd-parms.h
echo " Parameters for 1 arc-second high resolution mode of operation" >> hd-parms.h
echo -e " Generated by $0 by "$whoami" on "`date`"\n*/" >> hd-parms.h
echo "#define HD_MODE 1" >> hd-parms.h
if [ "$ans" = "1" ]; then
echo "#define MAXPAGES 1" >> hd-parms.h
fi
if [ "$ans" = "2" ]; then
echo "#define MAXPAGES 4" >> hd-parms.h
fi
if [ "$ans" = "3" ]; then
echo "#define MAXPAGES 9" >> hd-parms.h
fi
if [ "$ans" = "4" ]; then
echo "#define MAXPAGES 16" >> hd-parms.h
fi
if [ "$ans" = "5" ]; then
echo "#define MAXPAGES 25" >> hd-parms.h
fi
if [ "$ans" = "6" ]; then
echo "#define MAXPAGES 36" >> hd-parms.h
fi
if [ "$ans" = "7" ]; then
echo "#define MAXPAGES 49" >> hd-parms.h
fi
if [ "$ans" = "8" ]; then
echo "#define MAXPAGES 64" >> hd-parms.h
fi
else
rm -r hd-parms.h
fi
clear
echo -e "\n\n *****************************************************"
echo " * Now building SPLAT! and associated utilities... *"
echo " *****************************************************"
echo
./build all
if [ "$whoami" = "root" ]; then
echo -e "\nNow installing SPLAT! and associated utilities..."
echo
./install all
else
echo
echo "To install SPLAT! and its associated utilities, please"
echo "su to 'root' and execute the install script as follows:"
echo
echo -e "\t./install all"
fi
echo
echo "Don't forget to read the documentation under the docs directory"
echo "as well as the various README files in the splat and splat/utils"
echo -e "directories. Enjoy the program! John, KD2BD\n\n"