forked from thomasblanc/ocp-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure
executable file
·66 lines (57 loc) · 1.03 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
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
#!/bin/sh
VERSION=`cat VERSION`
PREFIX=/usr/local
BINDIR2=
MANDIR2=
while [ "$#" -gt 0 ]; do
case "$1" in
--prefix|-prefix)
PREFIX="$2"
shift
shift
;;
--bindir|-bindir)
BINDIR2="$2"
shift
shift
;;
--mandir|-mandir)
MANDIR2="$2"
shift
shift
;;
--obuild)
NO_INIT=yes
OBUILD="$2"
shift
shift
;;
*)
echo "Unknown option: $1" >&2
exit 2
esac
done
if [ -z "$BINDIR2" ]; then
BINDIR=$PREFIX/bin
else
BINDIR=$BINDIR2
fi
if [ -z "$MANDIR2" ]; then
MANDIR=$PREFIX/man
else
MANDIR=$MANDIR2
fi
if [ -z "$OBUILD" ]; then
OBUILD=./_obuild
fi
echo "OBUILD=$OBUILD" > Makefile.config
echo "BINDIR=$BINDIR" >> Makefile.config
echo "MANDIR=$MANDIR" >> Makefile.config
echo "VERSION=$VERSION" >> Makefile.config
echo "version=\"$VERSION\"" > build.ocp
echo "command=\"ocp-manager\"" >> build.ocp
echo "release_date=\"2014-02-26\"" >> build.ocp
cat build.ocp.in >> build.ocp
if [ -z "$NO_INIT" ]; then
ocp-build -init
fi