add args support for check-config.sh

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
This commit is contained in:
Qiang Huang 2015-01-23 16:36:55 +08:00
parent 3c77e7d634
commit aac6090f2d
1 changed files with 6 additions and 1 deletions

View File

@ -10,7 +10,12 @@ possibleConfigs=(
"/usr/src/linux-$(uname -r)/.config"
'/usr/src/linux/.config'
)
: ${CONFIG:="${possibleConfigs[0]}"}
if [ $# -gt 0 ]; then
CONFIG="$1"
else
CONFIG="${possibleConfigs[0]}"
fi
if ! command -v zgrep &> /dev/null; then
zgrep() {