root/branch/3.3.0/install_full

Revision 492, 1.8 kB (checked in by mswat, 4 years ago)
Line 
1
2#!/bin/bash
3
4function usage
5{
6    # Temporary function stub
7    echo "USAGE: ./install_full --install_path <directory where CompuCell will be installed>"
8    echo "or"
9    echo "USAGE: ./install_full -i <directory where CompuCell will be installed>"
10}
11
12export source_dir=${PWD}
13
14export install_path
15export build_type=Release
16
17while [ "$1" != "" ]; do
18    case $1 in
19        -i | --install_path )           shift
20                                install_path=$1
21                                echo "install_path: $install_path"
22                                ;;
23
24        -t | --build_type )           shift
25                                build_type=$1
26                                echo "build_type: $build_type"
27                                ;;
28                                                                                                                                       
29        -h | --help )           usage
30                                exit
31                                ;;
32        * )                     usage
33                                exit 1
34    esac
35    shift
36done
37
38
39if [ -w $install_path ]
40then
41    echo "Everything seems to be OK permission wise"
42else
43    if mkdir $install_path; then
44        echo "Successfully created installation directory: $install_path"
45        mkdir $install_path/cmake_binary_dir
46    else
47        echo "Could not create directory $install_path. Check if you have right permissions"
48        exit 1
49    fi
50
51fi
52
53cd $install_path/cmake_binary_dir
54
55if cmake -DCMAKE_INSTALL_PREFIX:STRING=$install_path -DCMAKE_BUILD_TYPE:STRING=$build_type ${source_dir}; then
56   echo "CONFIGURATION COMPLETE.PROCEDING TO COMPILATION"
57   if make ; then
58      echo "COMPILATION COMPLETE.PROCEEDING TO INSTALLATION"
59      if make install ; then
60         echo "COMPUCELL INSTALLED SUCCESSFULY"
61      else
62         echo "PROBLEMS DURING INSTALLATION"
63      fi
64     
65   else
66      echo "PROBLEMS DURING COMPILATION"
67   fi
68else
69   echo "ERRORS DURING CONFIGURATION"
70fi
71
72
73
Note: See TracBrowser for help on using the browser.