forked from Cacti/spine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap
executable file
·84 lines (74 loc) · 2.55 KB
/
bootstrap
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
#!/bin/sh
#
# ----------------------------------------------------------
# Name: bootstrap
#
# Function: build spine from scratch
#
# Description: This script will take a vanilla Spine source
# package and attempt to compile it. It will
# attempt to handle nasty things like dos2unix
# issues in all files and searching for the
# presence of required modules.
#
# It is not a replacement for the auto tools,
# but simply a supplement.
#
# ----------------------------------------------------------
# Help function
display_help () {
echo "--------------------------------------------------------------"
echo "Spine bootstrap script"
echo " Attempts to configure spine based on a 'normal' system. If you"
echo " install things in non-common locations you may have to use"
echo " the install instructions to build."
echo "--------------------------------------------------------------"
echo
}
# Check for parameters
if [ "${1}x" = "--helpx" -o "${1}x" = "-hx" ]; then
display_help
exit 0
fi
# Check for dos2unix
which dos2unix > /dev/null 2>&1
[ $? -gt 0 ] && echo "FATAL: Unable to locate dos2unix utility" && exit -1
echo "INFO: Starting Spine build process"
# Remove software build specific directories
echo "INFO: Removing cache directories"
rm -rf autom4te.cache .deps
# Make sure all files are unix formatted files
find . -type f -exec dos2unix --d2u \{\} \; > /dev/null 2>&1
# Prepare a build state
echo "INFO: Running auto-tools to verify buildability"
aclocal --install
libtoolize
automake --add-missing
autoreconf --force --install
[ $? -ne 0 ] && echo "ERROR: 'autoreconf' exited with errors" && exit -1
# Provide some meaningful notes
echo "INFO: Spine bootstrap process completed"
echo ""
echo " These instructions assume the default install location for spine"
echo " of /usr/local/spine. If you choose to use another prefix, make"
echo " sure you update the commands as required for that new path."
echo ""
echo " To compile and install Spine using MySQL versions 5.5 or higher"
echo " please do the following:"
echo ""
echo " ./configure"
echo " make"
echo " make install"
echo " chown root:root /usr/local/spine/bin/spine"
echo " chmod +s /usr/local/spine/bin/spine"
echo ""
echo " To compile and install Spine using MySQL versions previous to 5.5"
echo " please do the following:"
echo ""
echo " ./configure --with-reentrant"
echo " make"
echo " make install"
echo " chown root:root /usr/local/spine/bin/spine"
echo " chmod +s /usr/local/spine/bin/spine"
echo ""
exit 0