4
Fork 0

Improved build.sh

This commit is contained in:
Artem Prilutskiy 2016-08-04 11:18:57 +03:00
parent afd11a5218
commit 973e19240f

View file

@ -6,9 +6,7 @@ PROJECT=$(pwd)/..
OPENWRT=${HOME}/openwrt
test -d $OPENWRT/package/$PACKAGE
STATE=$?
if [ "$STATE" -eq "0" ]
if [ "$?" -eq "0" ]
then
# Remove existing package in buildroot
rm -rf $OPENWRT/package/$PACKAGE
@ -23,19 +21,15 @@ pushd . > /dev/null
cd $OPENWRT
if [ "$STATE" -eq "1" ]
then
# Build predefined packages for the first run
make
fi
# Make Makefile visible to Buildroot
mv package/$PACKAGE/source/OpenWRT/Makefile package/$PACKAGE
if [ "$STATE" -eq "1" ]
grep "CONFIG_PACKAGE_${PACKAGE}=m" .config > /dev/null
if [ "$?" -ne "0" ]
then
# Give user to choose package $PACKAGE
make menuconfig
make
fi
# Build package