forked from NOAA-OWP/noah-owp-modular
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure
executable file
·47 lines (37 loc) · 1.54 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
#!/usr/bin/perl
if($#ARGV == 0) {
$response = shift(@ARGV) ;
print("Configure build environment: $response \n");
}else {
print "Please select from following predefined environments: \n\n";
print " 1. Cheyenne pgf compiler \n";
print " 2. Linux PGI compiler \n";
print " 3. MacOS gfortran compiler, NETCDF from source \n";
print " 4. MacOS BigSur gfortran compiler, NETCDF from Brew \n";
print " 5. Linux gfortran compiler, NETCDF from source or module load \n";
print " 0. exit only \n";
printf "\nEnter selection : " ;
$response = <STDIN> ;
chop($response);
}
if ($response == 1) {
# Cheyenne
system "cp config/user_build_options.cheyenne user_build_options";
}
elsif ($response == 2) {
# Linux with pgf90 compiler
system "cp config/user_build_options.pgf90.linux user_build_options";
}
elsif ($response == 3) {
# MacOS, gfortran, NETCDF from source
system "cp config/user_build_options.macos.gfortran user_build_options";
}
elsif ($response == 4) {
# MacOS Big Sur, gfortran, NETCDF from source
system "cp config/user_build_options.bigsur.gfortran user_build_options";
}
elsif ($response == 5) {
# Linux, gfortran, NETCDF from source
system "cp config/user_build_options.gfortran.linux user_build_options";
}
else {print "no selection $response\n"; last}