/
install.sh
executable file
·88 lines (76 loc) · 1.54 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/bin/sh
#
# Local Install Script for cloudtrack
#
# //
# // Copyright (C) 2010 - Bernd H Stramm
# //
#
# // This program is distributed under the terms of
# // the GNU General Public License version 3
# //
# // This software is distributed in the hope that it will be useful,
# // but WITHOUT ANY WARRANTY; without even the implied warranty
# // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# //
DIR_BIN=bin
INSTALL_SYS=no
if [ $# -gt 0 ]
then
D=$1
if [ -d $D ]
then
INSTALL_DIR=$D
INSTALL_SYS=yes
else
INSTALL_SYS=no
echo "$D is not a directory"
fi
fi
DIR_VIEWER=viewer
DIR_COPIER=copier
DIR_IMPORT=import
PGM_VIEWER=cloudtrack
PGM_COPIER=copydb
PGM_IMPORT=dbimport
if [ ! -d $DIR_BIN ]
then
mkdir $DIR_BIN
fi
if [ -e $DIR_VIEWER/$PGM_VIEWER ]
then
install $DIR_VIEWER/$PGM_VIEWER $DIR_BIN
if [ $INSTALL_SYS == "yes" ]
then
install $DIR_VIEWER/$PGM_VIEWER $INSTALL_DIR
fi
else
echo "Failed to build $PGM_VIEWER"
fi
if [ -e $DIR_COPIER/$PGM_COPIER ]
then
install $DIR_COPIER/$PGM_COPIER $DIR_BIN
if [ $INSTALL_SYS == "yes" ]
then
install $DIR_COPIER/$PGM_COPIER $INSTALL_DIR
fi
else
echo "Failed to build $PGM_COPIER"
fi
if [ -e $DIR_IMPORT/$PGM_IMPORT ]
then
install $DIR_IMPORT/$PGM_IMPORT $DIR_BIN
if [ $INSTALL_SYS == "yes" ]
then
install $DIR_IMPORT/$PGM_IMPORT $INSTALL_DIR
fi
else
echo "Failed to build $PGM_IMPORT"
fi
ls -l $DIR_BIN
if [ $INSTALL_SYS == "yes" ]
then
ls -l $INSTALL_DIR/$PGM_VIEWER
ls -l $INSTALL_DIR/$PGM_COPIER
ls -l $INSTALL_DIR/$PGM_IMPORT
fi