3 ##############################################################################
4 # Simple script to configure, compile (and if you're 'root', install) SPLAT! #
5 # and associated utilities. Written by John A. Magliacane, KD2BD May 2002 #
6 # Last update: March 2009 #
7 ##############################################################################
12 until [ "$ans" = "2" ] || [ "$ans" = "3" ] || [ "$ans" = "4" ] || [ "$ans" = "5" ] || [ "$ans" = "6" ] || [ "$ans" = "7" ] || [ "$ans" = "8" ]; do
16 echo -e "\t ******************************************************"
17 echo -e "\t ** SPLAT! Standard Resolution Mode Configuration **"
18 echo -e "\t ******************************************************\n"
19 echo -e "\t Please select the Maximum Analysis Region capability"
20 echo -e "\t you would like SPLAT! to possess when operating in"
21 echo -e "\t 3 arc-second (standard) resolution mode based on"
22 echo -e "\t your available memory resources:\n"
23 echo -e "\t Maximum Analysis Region RAM + Swap Requirement"
24 echo -e "\t ====================================================\n"
25 echo -e "\t (2) 2 x 2 Degrees --------- 25 Megabytes minimum"
26 echo -e "\t (3) 3 x 3 Degrees --------- 52 Megabytes minimum"
27 echo -e "\t (4) 4 x 4 Degrees --------- 95 Megabytes minimum"
28 echo -e "\t (5) 5 x 5 Degrees --------- 145 Megabytes minimum"
29 echo -e "\t (6) 6 x 6 Degrees --------- 210 Megabytes minimum"
30 echo -e "\t (7) 7 x 7 Degrees --------- 285 Megabytes minimum"
31 echo -e "\t (8) 8 x 8 Degrees --------- 370 Megabytes minimum\n"
32 echo -n "Your choice: "
36 # Build std-parms.h file that will be copied into splat.h at compilation time
38 echo "/*" > std-parms.h
39 echo " Parameters for 3 arc-second standard resolution mode of operation" >> std-parms.h
40 echo -e " Generated by $0 by "$whoami" on "`date`"\n*/" >> std-parms.h
42 echo "#define HD_MODE 0" >> std-parms.h
44 if [ "$ans" = "2" ]; then
45 echo "#define MAXPAGES 4" >> std-parms.h
48 if [ "$ans" = "3" ]; then
49 echo "#define MAXPAGES 9" >> std-parms.h
52 if [ "$ans" = "4" ]; then
53 echo "#define MAXPAGES 16" >> std-parms.h
56 if [ "$ans" = "5" ]; then
57 echo "#define MAXPAGES 25" >> std-parms.h
60 if [ "$ans" = "6" ]; then
61 echo "#define MAXPAGES 36" >> std-parms.h
64 if [ "$ans" = "7" ]; then
65 echo "#define MAXPAGES 49" >> std-parms.h
68 if [ "$ans" = "8" ]; then
69 echo "#define MAXPAGES 64" >> std-parms.h
74 until [ "$ans" = "0" ] || [ "$ans" = "1" ] || [ "$ans" = "2" ] || [ "$ans" = "3" ] || [ "$ans" = "4" ] || [ "$ans" = "5" ] || [ "$ans" = "6" ] || [ "$ans" = "7" ] || [ "$ans" = "8" ]; do
78 echo -e "\t ******************************************************"
79 echo -e "\t ** SPLAT! HD High Resolution Mode Configuration **"
80 echo -e "\t ******************************************************\n"
81 echo -e "\t Please select the Maximum Analysis Region capability"
82 echo -e "\t you would like SPLAT! to possess when operating in"
83 echo -e "\t 1 arc-second (HD) resolution mode based on your"
84 echo -e "\t available memory resources (select 8x8 with caution):\n"
85 echo -e "\t Maximum Analysis Region RAM + Swap Requirement"
86 echo -e "\t ====================================================\n"
87 echo -e "\t (1) 1 x 1 Degrees --------- 52 Megabytes minimum"
88 echo -e "\t (2) 2 x 2 Degrees --------- 225 Megabytes minimum"
89 echo -e "\t (3) 3 x 3 Degrees --------- 468 Megabytes minimum"
90 echo -e "\t (4) 4 x 4 Degrees --------- 855 Megabytes minimum"
91 echo -e "\t (5) 5 x 5 Degrees --------- 1305 Megabytes minimum"
92 echo -e "\t (6) 6 x 6 Degrees --------- 1890 Megabytes minimum"
93 echo -e "\t (7) 7 x 7 Degrees --------- 2565 Megabytes minimum"
94 echo -e "\t (8) 8 x 8 Degrees --------- 3330 Megabytes minimum"
95 echo -e "\t (0) None of the above. Do not build SPLAT! HD.\n"
96 echo -n "Your choice: "
100 if [ "$ans" != "0" ]; then
102 # Build hd-parms.h file that will be copied into splat.h at compilation time
104 echo "/*" > hd-parms.h
105 echo " Parameters for 1 arc-second high resolution mode of operation" >> hd-parms.h
106 echo -e " Generated by $0 by "$whoami" on "`date`"\n*/" >> hd-parms.h
108 echo "#define HD_MODE 1" >> hd-parms.h
110 if [ "$ans" = "1" ]; then
111 echo "#define MAXPAGES 1" >> hd-parms.h
114 if [ "$ans" = "2" ]; then
115 echo "#define MAXPAGES 4" >> hd-parms.h
118 if [ "$ans" = "3" ]; then
119 echo "#define MAXPAGES 9" >> hd-parms.h
122 if [ "$ans" = "4" ]; then
123 echo "#define MAXPAGES 16" >> hd-parms.h
126 if [ "$ans" = "5" ]; then
127 echo "#define MAXPAGES 25" >> hd-parms.h
130 if [ "$ans" = "6" ]; then
131 echo "#define MAXPAGES 36" >> hd-parms.h
134 if [ "$ans" = "7" ]; then
135 echo "#define MAXPAGES 49" >> hd-parms.h
138 if [ "$ans" = "8" ]; then
139 echo "#define MAXPAGES 64" >> hd-parms.h
147 echo -e "\n\n *****************************************************"
149 echo " * Now building SPLAT! and associated utilities... *"
150 echo " *****************************************************"
153 if [ "$whoami" = "root" ]; then
154 echo -e "\nNow installing SPLAT! and associated utilities..."
159 echo "To install SPLAT! and its associated utilities, please"
160 echo "su to 'root' and execute the install script as follows:"
162 echo -e "\t./install all"
165 echo "Don't forget to read the documentation under the docs directory"
166 echo "as well as the various README files in the splat and splat/utils"
167 echo -e "directories. Enjoy the program! John, KD2BD\n\n"