Annotation of elwix/build_init.sh, revision 1.2
1.1 misho 1: #!/bin/sh
2: #
3: # ELWIX build script for setup host cross compile process - *** START FIRST *** -
4: #
5: # (C) AITNET ltd - Sofia/Bulgaria <office@aitnet.org>
6: # by Michael Pounov <misho@elwix.org>
7: #
1.2 ! misho 8: # $Id: build_init.sh,v 1.1.1.1.2.1 2011/07/19 21:54:27 misho Exp $
1.1 misho 9: #
10:
11: [ -r ./config/rc.elwix ] && . ./config/rc.elwix
12: if [ X"${ELWIX_IS_CONFIGURED}" != X"YES" ]; then
13: echo
14: echo "ELWIX project is not configured !?!"
15: echo
16: exit 1
17: fi
18:
19: if [ ! -d $BSDSRC ]; then
20: echo
21: echo "ELWIX project is not configured - missing BSD sources !?!"
22: echo
23: exit 1
24: fi
25:
26: if [ "${USER}" != "root" ]; then
27: echo
28: echo "ELWIX project is not configured - Init must build under root !?!"
29: echo
30: exit 1
31: fi
32:
33: clean_init()
34: {
35: echo "+++ Clean ELWIX Projects ..."
36: echo -n "Erase *ALL* builded ELWIX projects [NO/yes]? "
37: read LINE
38: if [ X"$LINE" = X"yes" ]; then
39: chflags -Rf noschg ${TOPDIR}
40: rm -rf $TOPDIR
41: mkdir -p $TOPDIR
42: echo "+++ Erased *ALL* builded ELWIX projects!"
43: fi
44: }
45:
46: install_init()
47: {
48: echo "+++ Install ELWIX Project directories ..."
49:
50: install -d $REL
51: install -d $DEST
52: install -d $OBJS
53: install -d $ADIR
54:
55: install -d $BSDOBJ
56:
1.2 ! misho 57: # ln -sf $BSDSRC
! 58:
1.1 misho 59: echo "ELWIX Platform:${PLATFORM} Version:${VERSION} TargetArch:${TARGET_ARCH}" >${TOPDIR}/elwix.ver
60: }
61:
62: ### main()
63: install -d ${TOPDIR}
64:
65: V=$(CheckVer ${TOPDIR}/elwix.ver)
66: if [ $? -ne 0 -o X"$V" != X"${VERSION}" ]; then
67: echo " Not found valid version or different version from current - Start CLEAN *ALL*"
68: rm -rf $TOPDIR
69: mkdir -p $TOPDIR
70: echo "+++ CLEAN *ALL* complete"
71: else
72: clean_init
73: fi
74:
75: install_init
76:
77: echo "+++ Complete Init ELWIX"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>