runc/script
Zhao Lei a9ec7c631c [check-config] No warning in blank argument
If user run current script whthout argument, the script will search
config in default dir list, but output following message:
 | # script/check-config.sh
 | warning: /proc/config.gz seems not a kernel config, searching other paths for kernel config ...
            ^^^^^^^^^^^^^^^
 | info: reading kernel config from /boot/config-4.7.0_HEAD_523d939ef98fd712632d93a5a2b588e477a7565e_ ...
 | ...

We can make output better by restruct the code struct:
1: Specify nothing
   Show info, and search default dir
2: Specify a config file
   Use it directly
3: Specify a wrong config file
   Show warning, and search default dir
4: Specify a dir
   Info, and search specified dir

Test:
 | # script/check-config.sh
 | info: no config specified, searching for kernel config ...
 | info: reading kernel config from /boot/config-4.7.0_HEAD_523d939ef98fd712632d93a5a2b588e477a7565e_ ...
 |
 | # script/check-config.sh /linux/.config
 | info: reading kernel config from /linux/.config ...
 |
 | # script/check-config.sh /linux/.configgg
 | warning: /linux/.configgg seems not a kernel config, searching other paths for kernel config ...
 | info: reading kernel config from /boot/config-4.7.0_HEAD_523d939ef98fd712632d93a5a2b588e477a7565e_ ...
 |
 | # script/check-config.sh /linux
 | info: input is a directory, searching for kernel config in this directory...
 | info: reading kernel config from /linux/.config ...
 |

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
2016-09-06 16:29:43 +08:00
..
.validate Add ci target 2015-07-09 06:19:26 -07:00
check-config.sh [check-config] No warning in blank argument 2016-09-06 16:29:43 +08:00
tmpmount Replace dind with smaller script 2015-07-30 13:23:26 -07:00
validate-gofmt Add ci target 2015-07-09 06:19:26 -07:00