]> git.sur5r.net Git - kconfig-frontends/commitdiff
scripts/ksync: append git-log when syncing
authorYann E. MORIN" <yann.morin.1998@free.fr>
Tue, 29 May 2012 21:16:45 +0000 (23:16 +0200)
committerYann E. MORIN" <yann.morin.1998@free.fr>
Tue, 29 May 2012 21:16:45 +0000 (23:16 +0200)
When syncing from the kernel, run 'git log' on the affected files,
and store it locally.

This will be used to generate announcements for the future releases.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
scripts/ksync.log [new file with mode: 0644]
scripts/ksync.sh

diff --git a/scripts/ksync.log b/scripts/ksync.log
new file mode 100644 (file)
index 0000000..e69de29
index 0775a6d67967d64d83ec4ab0424c1ff4294a3766..4346f460746de880038c6bceaf4df603c10d447a 100755 (executable)
@@ -15,6 +15,9 @@ if [ ! \( -n "${k_dir}" -a -d "${k_dir}/kernel" \) ]; then
     exit 1
 fi
 
+# Save current version
+k_cset_old=$( head -n 1 .version |awk '{ print $(2); }' )
+
 # Get the kernel version
 eval $( head -n 5 "${k_dir}/Makefile"                       \
         |sed -r -e 's/^/K_/; s/"//g; s/ = ?/="/; s/$/"/;'   \
@@ -37,10 +40,22 @@ printf "%d.%d.%d%s %s %s\n%s\n"             \
        "${kf_version}"                      \
        >.version
 
+# Sync-up the files
+k_files=""
 while read k_file trash kf_file; do
+    k_files="${k_files} ${k_file}"
     mkdir -p "${kf_file%/*}"
     cp -v "${k_dir}/${k_file}" "${kf_file}"
     if [ -f "${kf_file}.patch" ]; then
         patch --no-backup-if-mismatch -g0 -F1 -p1 -f <"${kf_file}.patch"
     fi
 done <scripts/kernel2kfrontends.list
+
+# Save the changelog between the old cset and now
+printf "Synced-up these changes:\n"
+( cd "${k_dir}"
+  git log --no-merges --pretty='tformat:%s'     \
+    "${k_cset_old}..${k_cset}"                  \
+    ${k_files}                                  \
+)|tee -a "scripts/ksync.log"                    \
+ |sed -r -e 's/^/    /;'