From: Yann E. MORIN" Date: Sun, 22 Jan 2012 18:26:34 +0000 (+0100) Subject: ksync: fix error message when no kernel path is provided X-Git-Tag: v3.3.0-0~40 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e035873cea2d0271801490dca63099020208d022;p=kconfig-frontends ksync: fix error message when no kernel path is provided Signed-off-by: "Yann E. MORIN" --- diff --git a/ksync.sh b/ksync.sh index 85b6ce1..7af9ac0 100755 --- a/ksync.sh +++ b/ksync.sh @@ -4,8 +4,8 @@ my_name="${0##*/}" # If an argument is given, it's the location # of the Linux kernel source tree -if [ -n "${1}" -a -d "${1}/kernel" ]; then - k_dir="${1}" +k_dir="${1}" +if [ -n "${k_dir}" -a -d "${k_dir}/kernel" ]; then # Get the version eval $( head -n 5 "${k_dir}/Makefile" \ |sed -r -e 's/^/K_/; s/ = ?/="/; s/$/"/;' \ @@ -14,7 +14,7 @@ if [ -n "${1}" -a -d "${1}/kernel" ]; then "${K_VERSION}" "${K_PATCHLEVEL}" "${K_SUBLEVEL}" \ "${K_EXTRAVERSION}" "${K_NAME}" else - if [ -z "${1}" ]; then + if [ -n "${k_dir}" ]; then printf "%s: \`%s': not a Linux kernel source tree\n" \ "${my_name}" "${k_dir}" else