-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathpreinstall_hdf5.sh
executable file
·79 lines (68 loc) · 1.78 KB
/
preinstall_hdf5.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
#!/bin/bash
#installs autoconf, automake, libtool to the current directory (installs in a directory called 'util')
CC=gcc
AUTOCONF_VERS=autoconf-2.69
AUTOMAKE_VERS=automake-1.15
LIBTOOL_VERS=libtool-2.4.6
#
# Should not need to modify any lines below
#
INSTALL_DIR=$(pwd)
export PATH="${INSTALL_DIR}/util/bin:${PATH}"
wget http://ftp.gnu.org/gnu/autoconf/$AUTOCONF_VERS.tar.gz
tar xzf $AUTOCONF_VERS.tar.gz
cd $AUTOCONF_VERS
./configure --prefix=$INSTALL_DIR/util CC=$CC
make
status=$?
if [[ $status != 0 ]]; then
echo "AUTOCONF FAILED: make"
exit $status
fi
make install
status=$?
if [[ $status != 0 ]]; then
echo "AUTOCONF FAILED: make install"
exit $status
fi
cd ..
wget http://ftp.gnu.org/gnu/automake/$AUTOMAKE_VERS.tar.gz
tar xzf $AUTOMAKE_VERS.tar.gz
cd $AUTOMAKE_VERS
./configure --prefix=$INSTALL_DIR/util CC=$CC
make
status=$?
if [[ $status != 0 ]]; then
echo "AUTOMAKE FAILED: make"
exit $status
fi
make install
status=$?
if [[ $status != 0 ]]; then
echo "AUTOMAKE FAILED: make install"
exit $status
fi
cd ..
wget http://ftp.gnu.org/gnu/libtool/$LIBTOOL_VERS.tar.gz
tar xzf $LIBTOOL_VERS.tar.gz
cd $LIBTOOL_VERS
./configure --prefix=$INSTALL_DIR/util CC=$CC
make
status=$?
if [[ $status != 0 ]]; then
echo "LIBTOOL FAILED: make"
exit $status
fi
make install
status=$?
if [[ $status != 0 ]]; then
echo "LIBTOOL FAILED: make install"
exit $status
fi
cd ..
#rm -fr autoconf* automake* libtool* util
#PATH=$INSTALL_DIR/util/bin:$PATH
NO_COLOR='\033[0m'
GREEN_COLOR='\033[32;01m'
RED_COLOR='\033[31;01m'
printf "\n${GREEN_COLOR} *** YOU NEED TO ADD THE util DIR TO PATH ****\n In bash: ${RED_COLOR} export PATH=\"${INSTALL_DIR}/util/bin:\$PATH\" ${GREEN_COLOR} ${GREEN_COLOR} \n In csh: ${RED_COLOR} setenv PATH \"${INSTALL_DIR}/util/bin:\$PATH\" ${NO_COLOR} \n\n"