/[MITgcm]/MITgcm_contrib/PRM/build_scripts/pkg_tool/pkg_tool_funcs.sh
ViewVC logotype

Annotation of /MITgcm_contrib/PRM/build_scripts/pkg_tool/pkg_tool_funcs.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download) (as text)
Tue Apr 5 13:18:55 2005 UTC (20 years, 3 months ago) by cnh
Branch point for: MAIN, baseline
File MIME type: application/x-sh
Initial revision

1 cnh 1.1 #!/bin/sh -f
2     #
3     # Functions used by the build_pkg shell script.
4     #
5     #
6     check_action() {
7     theaction=$1
8     therc=1
9     if [ "x$theaction" == "xbuild" ]; then
10     therc=0
11     fi
12     if [ "x$theaction" == "xclean" ]; then
13     therc=0
14     fi
15     if [ "x$therc" == "x1" ]; then
16     write_usage
17     exit $therc
18     fi
19     }
20    
21     check_rc_exit() {
22     therc=$1
23     thecommand=$2
24     themessage=$3
25     if [ "x$therc" != "x0" ]; then
26     echo "$themessage"
27     echo " Command:"
28     echo " >>" "$thecommand"
29     echo " Error:"
30     cat ${STDERR} | awk '{print " >> ",$0}'
31     echo "\"$0\" exiting with return code $rc"
32     exit $rc
33     fi
34     }
35    
36    
37     is_comment_line() {
38     line=$1
39     if [ "x${line:0:1}" != "x#" ] && [ "x${line:0:1}" != "x" ]; then
40     return 0
41     else
42     return 1
43     fi
44     }
45    
46     write_usage() {
47     echo "Usage: $0 [build|clean]"
48     }
49    

  ViewVC Help
Powered by ViewVC 1.1.22