forked from networkupstools/nut
-
Notifications
You must be signed in to change notification settings - Fork 0
/
autogen.sh
executable file
·35 lines (32 loc) · 1.17 KB
/
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
#! /bin/sh
#
# Autoreconf wrapper script to ensure that the source tree is
# in a buildable state
# re-generate files needed by configure, and created otherwise at 'dist' time
if [ ! -f scripts/augeas/nutupsconf.aug.in ]
then
if python -c "import re,glob,codecs"; then
echo "Regenerating Augeas ups.conf lens..."
cd scripts/augeas && ./gen-nutupsconf-aug.py && cd ../..
else
echo "----------------------------------------------------------------------"
echo "Warning: Python is not available."
echo "Skipping Augeas ups.conf lens regeneration."
echo "----------------------------------------------------------------------"
fi
fi
if [ ! -f scripts/hal/ups-nut-device.fdi.in ] || [ ! -f scripts/udev/nut-usbups.rules.in ]
then
if perl -e 1; then
echo "Regenerating the USB helper files..."
cd tools && ./nut-usbinfo.pl && cd ..
else
echo "----------------------------------------------------------------------"
echo "Error: Perl is not available."
echo "Skipping the USB helper files regeneration."
echo "----------------------------------------------------------------------"
fi
fi
# now we can safely call autoreconf
echo "Calling autoreconf..."
autoreconf -i