source: palm/trunk/SCRIPTS/palm_simple_install @ 424

Last change on this file since 424 was 421, checked in by raasch, 12 years ago

a simple method for installing and running palm has been added

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 2.0 KB
Line 
1#!/bin/ksh
2# palm_simple_install - a script for simple installation and compilation of
3#                       the palm code without using mbuild
4# $Id: palm_simple_install 421 2010-01-25 15:50:10Z raasch $
5
6     # This script creates (from the working copy of the palm repository)
7     # a subdirectory MAKE_DEPOSITORY_simple which contains a copy of the
8     # palm source code and  a modified makefile which loads required compiler
9     # and preprocessor settings via "include MAKE.inc"
10
11     # Options: -i <include file>
12     #          one of the include files in ~/palm/current_version/trunk/INSTALL
13
14     # Last changes:
15     # 25/01/10 - Siggi - Generating the first version
16
17
18    # Variable declarations + default values
19 include_file=unknown
20
21
22    # Read shellscript options
23 while  getopts  :i:  option
24 do
25   case  $option  in
26       (i)   include_file=$OPTARG;;
27       (\?)  printf "\n  +++ unknown option $OPTARG \n"
28             printf "\n      allowed option are -d, -f, -l, -s \n"
29             exit;;
30   esac
31 done
32
33
34
35    # Switch to default working directory
36 cd  ~/palm/current_version
37
38
39    # Check, if include file exists
40 if [[ ! -f trunk/INSTALL/$include_file ]]
41 then
42    echo "+++ ERROR: include file"
43    echo "    \"trunk/INSTALL/$include_file\""
44    echo "    not found"
45    exit
46 fi
47
48
49     # Create the make depository
50 if [[ ! -d MAKE_DEPOSITORY_simple ]]
51 then
52    mkdir  MAKE_DEPOSITORY_simple
53 else
54    rm  MAKE_DEPOSITORY_simple/*
55 fi
56
57
58     # Copy makefile and all source code files to make depository
59 cp  trunk/SOURCE/Makefile        MAKE_DEPOSITORY_simple/Makefile_old
60 cp  trunk/INSTALL/$include_file  MAKE_DEPOSITORY_simple/MAKE.inc
61 cp  trunk/SOURCE/*.f90           MAKE_DEPOSITORY_simple
62
63
64     # Replace comment in makefile by include statement
65 sed  's/#to_be_replaced_by_include/include MAKE.inc/g'  MAKE_DEPOSITORY_simple/Makefile_old  >  MAKE_DEPOSITORY_simple/Makefile
66 rm  MAKE_DEPOSITORY_simple/Makefile_old
67
68
69     # Create directory for input files
70 if [[ ! -d JOBS/example_cbl/INPUT ]]
71 then
72    mkdir -p  JOBS/example_cbl/INPUT
73    cp trunk/INSTALL/example_cbl_p3d  JOBS/example_cbl/INPUT
74 fi
Note: See TracBrowser for help on using the repository browser.