#!/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>