4 echo "Usage: apply_heimdal.sh <lorikeet_path>"
12 pushd $LORIKEET_PATH ||
exit 1
17 # From https://gist.github.com/kfish/7425248
27 cat $filename |
while read line
; do
28 if [ "$line" == "---" ]; then
30 patch $patch_args -p1 < $filename
31 git commit
-a -m 'CHECK AUTHOR' -m "$msg"
35 if [ "$gotSubject" == "no" ]; then
37 if [ "${hdr[0]}" == "Subject" ]; then
51 git format-patch
--stdout $commit -1 source4/heimdal
> "$commit".
patch
52 sed -i 's|/source4/heimdal/|/|g' "$commit".
patch
53 sed -i "s|^---$|(cherry picked from Samba commit $commit)\n---|g" "$commit".
patch
54 pushd $LORIKEET_PATH ||
exit 1
57 if patch -p1 --forward < "$S4PATH/$commit.patch"; then
59 echo "Commit $commit can apply - applying"
61 git am
"$S4PATH/$commit.patch" || apply
"$S4PATH/$commit.patch"
64 echo "Commit $commit does not apply cleanly"
71 commits
="$(git log --pretty=oneline --reverse $IMPORT_HASH..HEAD -- source4/heimdal | cut -d' ' -f1)"
74 echo -n "Try apply? [Y/n] "