1
1

Allow setting the project name via the PROJECT environment variable

This commit is contained in:
2026-08-19 12:46:07 +02:00
parent c6f77833d6
commit 4617359194
+7 -4
View File
@@ -1,12 +1,15 @@
#!/bin/sh
if [[ "$1" == "" ]] ; then
if [[ "$PROJECT" == "" ]] ; then
echo "Please specify the project name!"
exit 0
exit 1
fi
P=$PROJECT
else
P=$1
fi
P=$1
echo "P=$P"
if [ ! -e $TOPDIR/configs/$P/platform.defconfig ] || [ ! -e $TOPDIR/configs/$P/project.defconfig ] ; then
@@ -16,6 +19,7 @@ else
echo "merge $TOPDIR/configs/$P/platform.defconfig and $TOPDIR/configs/$P/project.defconfig to .config!"
cat $TOPDIR/configs/$P/platform.defconfig $TOPDIR/configs/$P/project.defconfig > $TOPDIR/.config
fi
if [ -e $TOPDIR/configs/$P/external_toolchain.defconfig ] ; then
echo "merge $TOPDIR/configs/$P/external_toolchain.defconfig to .config!"
cat $TOPDIR/configs/$P/external_toolchain.defconfig >> $TOPDIR/.config
@@ -27,7 +31,6 @@ if [ -e $TOPDIR/configs/$P/external_toolchain.defconfig ] ; then
fi
fi
if [[ "$P" == "ipq807x" ]] ; then
echo "QCA PLATFORM, use right version."
rm -rf $TOPDIR/include $TOPDIR/scripts