source: palm/trunk/SCRIPTS/palm_simple_install @ 1046

Last change on this file since 1046 was 1046, checked in by maronga, 11 years ago

put scripts and utilities under GPL

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 3.0 KB
RevLine 
[421]1#!/bin/ksh
[1046]2#--------------------------------------------------------------------------------#
3# This file is part of PALM.
4#
5# PALM is free software: you can redistribute it and/or modify it under the terms
6# of the GNU General Public License as published by the Free Software Foundation,
7# either version 3 of the License, or (at your option) any later version.
8#
9# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
10# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
11# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License along with
14# PALM. If not, see <http://www.gnu.org/licenses/>.
15#
16# Copyright 1997-2012  Leibniz University Hannover
17#--------------------------------------------------------------------------------#
18#
19# Current revisions:
20# -----------------
21# code put under GPL (PALM 3.9)
22#
23# Former revisions:
24# -----------------
25# $Id: palm_simple_install 1046 2012-11-09 14:38:45Z maronga $
26
[421]27# palm_simple_install - a script for simple installation and compilation of
28#                       the palm code without using mbuild
29     # This script creates (from the working copy of the palm repository)
30     # a subdirectory MAKE_DEPOSITORY_simple which contains a copy of the
31     # palm source code and  a modified makefile which loads required compiler
32     # and preprocessor settings via "include MAKE.inc"
33
34     # Options: -i <include file>
35     #          one of the include files in ~/palm/current_version/trunk/INSTALL
36
37     # Last changes:
38     # 25/01/10 - Siggi - Generating the first version
[515]39     # 18/03/10 - Siggi - switch to palm/current_version removed: working
40     #                    copy can be in any directory
[421]41
42
43    # Variable declarations + default values
44 include_file=unknown
45
46
47    # Read shellscript options
48 while  getopts  :i:  option
49 do
50   case  $option  in
51       (i)   include_file=$OPTARG;;
52       (\?)  printf "\n  +++ unknown option $OPTARG \n"
53             printf "\n      allowed option are -d, -f, -l, -s \n"
54             exit;;
55   esac
56 done
57
58
59
60    # Check, if include file exists
61 if [[ ! -f trunk/INSTALL/$include_file ]]
62 then
63    echo "+++ ERROR: include file"
64    echo "    \"trunk/INSTALL/$include_file\""
65    echo "    not found"
66    exit
67 fi
68
69
70     # Create the make depository
71 if [[ ! -d MAKE_DEPOSITORY_simple ]]
72 then
73    mkdir  MAKE_DEPOSITORY_simple
74 else
75    rm  MAKE_DEPOSITORY_simple/*
76 fi
77
78
79     # Copy makefile and all source code files to make depository
80 cp  trunk/SOURCE/Makefile        MAKE_DEPOSITORY_simple/Makefile_old
81 cp  trunk/INSTALL/$include_file  MAKE_DEPOSITORY_simple/MAKE.inc
82 cp  trunk/SOURCE/*.f90           MAKE_DEPOSITORY_simple
83
84
85     # Replace comment in makefile by include statement
86 sed  's/#to_be_replaced_by_include/include MAKE.inc/g'  MAKE_DEPOSITORY_simple/Makefile_old  >  MAKE_DEPOSITORY_simple/Makefile
87 rm  MAKE_DEPOSITORY_simple/Makefile_old
88
89
90     # Create directory for input files
91 if [[ ! -d JOBS/example_cbl/INPUT ]]
92 then
93    mkdir -p  JOBS/example_cbl/INPUT
94    cp trunk/INSTALL/example_cbl_p3d  JOBS/example_cbl/INPUT
95 fi
Note: See TracBrowser for help on using the repository browser.