source:
branches/2012/dev_CMCC_INGV_2012/NEMOGCM/TOOLS/COMPILE/Fcheck_archfile.sh
@
9309
Last change on this file since 9309 was 3294, checked in by rblod, 13 years ago | |
---|---|
|
|
File size: 1.2 KB |
Line | |
---|---|
1 | #!/bin/bash |
2 | #set -x |
3 | set -o posix |
4 | #set -u |
5 | #set -e |
6 | #+ |
7 | # |
8 | # ================== |
9 | # Fcheck_archfile.sh |
10 | # ================== |
11 | # |
12 | # -------------------------- |
13 | # Check the compilation file |
14 | # -------------------------- |
15 | # |
16 | # SYNOPSIS |
17 | # ======== |
18 | # |
19 | # :: |
20 | # |
21 | # $ Fcheck_archfile.sh |
22 | # |
23 | # |
24 | # DESCRIPTION |
25 | # =========== |
26 | # |
27 | # |
28 | # Check the choice of the compiler. |
29 | # Three cases : |
30 | # |
31 | # - There was a previous choice |
32 | # - A new one has be specified, we use this one |
33 | # - No information, exit |
34 | # |
35 | # We use TOOLS/COMPILE/arch.fcm to see if something was chosen. |
36 | # |
37 | # EXAMPLES |
38 | # ======== |
39 | # |
40 | # :: |
41 | # |
42 | # $ ./Fcheck_archfile.sh ARCHFILE COMPILER |
43 | # |
44 | # |
45 | # TODO |
46 | # ==== |
47 | # |
48 | # option debug |
49 | # |
50 | # |
51 | # EVOLUTIONS |
52 | # ========== |
53 | # |
54 | # $Id$ |
55 | # |
56 | # |
57 | # |
58 | # * creation |
59 | # |
60 | #- |
61 | |
62 | if [ ${#2} -eq 0 ]; then |
63 | if [ ! -f ${COMPIL_DIR}/$1 ]; then |
64 | echo "Warning !!!" |
65 | echo "NO compiler chosen" |
66 | echo "Try makenemo -h for help" |
67 | echo "EXITING..." |
68 | exit 1 |
69 | fi |
70 | else |
71 | myfile=$( find ${MAIN_DIR}/ARCH -name arch-${2}.fcm -print ) |
72 | if [ ${#myfile} -gt 0 ]; then |
73 | ln -sf ${myfile} ${COMPIL_DIR}/$1 |
74 | else |
75 | echo "Warning !!!" |
76 | echo "Compiler not existing" |
77 | echo "Try makenemo -h for help" |
78 | echo "EXITING..." |
79 | exit 1 |
80 | fi |
81 | fi |
Note: See TracBrowser
for help on using the repository browser.