From 8185964f196854bff4d0aa343ae37460fa719e51 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Sun, 22 Jan 2012 23:55:14 +0100 Subject: [PATCH] ksync: handle names with double quotes Some versions of the Linux kernel have double quotes, for example linux-3.1 is named: "Divemaster Edition" while linux-3.2 is named: Saber-toothed Squirrel Just remove doubles quotes. Signed-off-by: "Yann E. MORIN" --- ksync.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ksync.sh b/ksync.sh index 7af9ac0..c8a2dc1 100755 --- a/ksync.sh +++ b/ksync.sh @@ -7,8 +7,8 @@ my_name="${0##*/}" 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/$/"/;' \ + eval $( head -n 5 "${k_dir}/Makefile" \ + |sed -r -e 's/^/K_/; s/"//g; s/ = ?/="/; s/$/"/;' \ ) printf "Found Linux kernel %d.%d.%d%s '%s'\n" \ "${K_VERSION}" "${K_PATCHLEVEL}" "${K_SUBLEVEL}" \ -- 2.39.5