5 # If an argument is given, it's the location
6 # of the Linux kernel source tree
8 if [ ! \( -n "${k_dir}" -a -d "${k_dir}/kernel" \) ]; then
9 if [ -n "${k_dir}" ]; then
10 printf "%s: \`%s': not a Linux kernel source tree\n" \
11 "${my_name}" "${k_dir}"
13 printf "Usage: %s /path/to/kernel/dir\n" "${my_name}"
18 # Get the kernel version
19 eval $( head -n 5 "${k_dir}/Makefile" \
20 |sed -r -e 's/^/K_/; s/"//g; s/ = ?/="/; s/$/"/;' \
22 k_cset="$( cd "${k_dir}"; \
23 git log -n 1 --pretty='format:%H' \
25 printf "Found Linux kernel %d.%d.%d%s '%s' (%7.7s)\n" \
26 "${K_VERSION}" "${K_PATCHLEVEL}" "${K_SUBLEVEL}" \
27 "${K_EXTRAVERSION}" "${K_NAME}" "${k_cset}"
29 # Get the kconfig-frontends version
30 kf_version="$( tail -n 1 .version )"
32 # Store the new version
33 printf "%d.%d.%d%s %s %s\n%s\n" \
34 "${K_VERSION}" "${K_PATCHLEVEL}" \
35 "${K_SUBLEVEL}" "${K_EXTRAVERSION}" \
36 "${k_cset}" "${K_NAME}" \
40 exec <misc/kernel2kfrontends.list
41 while read k_file trash kf_file; do
42 cp -v "${k_dir}/${k_file}" "${kf_file}"
43 if [ -f "${kf_file}.patch" ]; then
44 patch --no-backup-if-mismatch -g0 -F1 -p1 -f <"${kf_file}.patch"