File:  [ELWIX - Embedded LightWeight unIX -] / elwix / apply_patches.sh
Revision 1.2: download - view: text, annotated - select for diffs - revision graph
Thu Mar 11 13:59:50 2021 UTC (3 years, 9 months ago) by misho
Branches: MAIN
CVS tags: elwix2_8, elwix2_7, HEAD, ELWIX2_7, ELWIX2_6
ver 2.6

#!/bin/sh
#
# ELWIX build script for apply patches on source
#
# (C) AITNET ltd - Sofia/Bulgaria <office@aitnet.org>
#    by Michael Pounov <misho@elwix.org>
#
# $Id: apply_patches.sh,v 1.2 2021/03/11 13:59:50 misho Exp $
#

[ -r ./config/rc.elwix ] && . ./config/rc.elwix
if [ X"${ELWIX_IS_CONFIGURED}" != X"YES" ]; then
	echo
	echo "ELWIX project is not configured !?!"
	echo
	exit 1
fi

if [ ! -d $BSDSRC ]; then
	echo
	echo "ELWIX project is not configured - missing BSD sources !?!"
	echo
	exit 1
fi

if [ "${USER}" != "root" ]; then
	echo
	echo "ELWIX project is not configured - Init must build under root !?!"
	echo
	exit 1
fi

### main()
if [ ! -d patches ]; then
	exit 0
fi

cd patches

for i in *; do
	if [ -d $i ]; then
		continue
	fi

	patch -N -d $BSDSRC <$i
done

echo "+++ Complete Patches ELWIX"

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>