include/toplevel.mk: fix defconfig when ~/.openwrt/defconfig exists - take 2
authorJohn Crispin <john@phrozen.org>
Wed, 6 Jul 2016 08:34:44 +0000 (10:34 +0200)
committerJohn Crispin <john@phrozen.org>
Wed, 6 Jul 2016 08:40:12 +0000 (10:40 +0200)
commit 5b728074160b ("include/toplevel.mk: fix defconfig when
~/.openwrt/defconfig exists") was missing a !

Signed-off-by: John Crispin <john@phrozen.org>
include/toplevel.mk

index 3844f3c..e13acaf 100644 (file)
@@ -110,7 +110,7 @@ config-clean: FORCE
 
 defconfig: scripts/config/conf prepare-tmpinfo FORCE
        touch .config
 
 defconfig: scripts/config/conf prepare-tmpinfo FORCE
        touch .config
-       @if [  -s .config -a -e $(HOME)/.openwrt/defconfig ]; then cp $(HOME)/.openwrt/defconfig .config; fi
+       @if [ ! -s .config -a -e $(HOME)/.openwrt/defconfig ]; then cp $(HOME)/.openwrt/defconfig .config; fi
        $< --defconfig=.config Config.in
 
 confdefault-y=allyes
        $< --defconfig=.config Config.in
 
 confdefault-y=allyes