-
Notifications
You must be signed in to change notification settings - Fork 35
/
configure
executable file
·41 lines (36 loc) · 1.11 KB
/
configure
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/bash
# This is no real configure script. But it makes
# sure that all build dependencies are installed,
# if you are running on a well known distribution.
DISTRO=$(./distro _) || { \
echo "Your linux distribution is unknown. Good luck!"
exit 1
}
echo "You are running on $DISTRO."
M=distros/Makefile.$DISTRO
if [ ! -e "$M" ]
then
echo "This distribution is not supported. You might succeed anyway."
echo "Good luck!"
exit 1
fi
if ! make --version >/dev/null 2>&1; then
echo 'Please install "make" before executing this script.'
exit 1
fi
BUILD_PACS=$( make -f echo.mk FILE=$M VAR=BUILD_PACKAGES | sed -e 's/\ \ */ /g' -e 's/|.*$//' )
PACKAGER=$( make -f echo.mk FILE=$M VAR=PACKAGE_INSTALL )
BECOME_ROOT=$( make -f echo.mk FILE=$M VAR=BECOME_ROOT )
CMD="$PACKAGER $BUILD_PACS"
if [ $UID != 0 ]
then
CMD="$BECOME_ROOT '$CMD'"
fi
echo "Going to run >>>$CMD<<<..."
if eval "$CMD" ; then
echo "OK - You are now ready for 'make && make pack'"
else
echo "ERROR. Some packages could not be installed. You will get "
echo "Problems while compiling if something is missing."
exit 1
fi