forked from networkupstools/nut-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
autogen.sh
executable file
·41 lines (35 loc) · 931 Bytes
/
autogen.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
#! /bin/sh
#
# Autoreconf wrapper script to ensure that the source tree is in a buildable state
spacer="----------------------------------------------------------------------"
echo_spacer() {
echo "$spacer"
}
quit () {
echo_spacer
echo "Unable to build website"
exit
}
# Initialize submodules and get NUT
echo "Getting NUT"
echo_spacer
echo "Initializing the submodules..."
git submodule init || quit
echo "Updating the submodules..."
git submodule update || quit
echo_spacer
# Call NUT's autogen.sh to regenerate files needed by NUT's configure:
# - scripts/augeas/nutupsconf.aug.in
# - scripts/hal/ups-nut-device.fdi.in
# - scripts/udev/nut-usbups.rules.in
echo "Readying NUT"
echo_spacer
( cd nut && ./autogen.sh ) || quit
echo_spacer
# Call autoreconf
echo "Readying NUT Website"
echo_spacer
echo "Calling autoreconf..."
autoreconf -i || quit
echo_spacer
echo "You can now safely configure and build website!"