4 echo "Usage: apply_heimdal.sh <lorikeet_path>"
12 pushd $LORIKEET_PATH || exit 1
19 git format-patch --stdout $commit -1 source4/heimdal > "$commit".patch
20 sed -i 's|/source4/heimdal/|/|g' "$commit".patch
21 sed -i "s|^---$|(cherry picked from Samba commit $commit)\n---|g" "$commit".patch
22 pushd $LORIKEET_PATH || exit 1
25 if patch -p1 --forward < "$S4PATH/$commit.patch"; then
27 echo "Commit $commit can apply - applying"
29 git am "$S4PATH/$commit.patch"
32 echo "Commit $commit does not apply cleanly"
38 commits="$(git log --pretty=oneline --reverse $IMPORT_HASH..HEAD -- source4/heimdal | cut -d' ' -f1)"
41 echo -n "Try apply? [Y/n] "