Skip to content

Commit cca04cc

Browse files
committed
fix: missing defconfig in rebuild target
1 parent 3153a46 commit cca04cc

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

scripts/openwrt/build.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ cd "$vps_root_dir/openwrt" || { errormsg "could not cd into openwrt directory";
4141

4242
if [ -n "$rebuild" ]; then
4343
board=$(sed -n 's/^CONFIG_TARGET_BOARD="\(.*\)"/\1/p' .config)
44+
# If board is missing -> typically means that 'make defconfig' wasn't done
45+
if [ -z $board ]; then
46+
make defconfig
47+
board=$(sed -n 's/^CONFIG_TARGET_BOARD="\(.*\)"/\1/p' .config)
48+
fi
4449
target=$(sed -n 's/^CONFIG_TARGET_SUBTARGET="\(.*\)"/\1/p' .config)
4550
rm "bin/targets/$board/$target"/openwrt-*
4651
else

0 commit comments

Comments
 (0)