acpica/generate/linux/patches/git-patches.sh
Robert Moore 5c55a3aed7 Update linux patchgen scripts for git.
Update for use with CVS to use for git.
2008-07-01 09:05:25 -07:00

26 lines
515 B
Bash
Executable File

#!/bin/sh
old_release=$1
new_release=$2
git_patch_dir=$3
commits="`git-rev-list --reverse $old_release..$new_release`"
commits_count="`git-rev-list --reverse $old_release..$new_release | wc -l`"
digit=1
while [ $commits_count -gt 9 ] ; do
(( commits_count = commits_count / 10 ))
(( digit = digit + 1 ))
done
num=0
for commit in $commits ; do
(( num = num + 1 ))
#patch file name: 01.patch 02.patch ...
filename=`printf "%.${digit}d" $num`
git show $commit > ${git_patch_dir}/${filename}.patch
done