File:  [ELWIX - Embedded LightWeight unIX -] / elwix / build_init.sh
Revision 1.2: download - view: text, annotated - select for diffs - revision graph
Tue Oct 18 09:02:05 2011 UTC (12 years, 7 months ago) by misho
Branches: MAIN
CVS tags: elwix1_6, elwix1_5, HEAD, ELWIX1_5
ver 1.5

    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: #
    8: # $Id: build_init.sh,v 1.2 2011/10/18 09:02:05 misho Exp $
    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: 
   57: #	ln -sf $BSDSRC
   58: 
   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>