s3: smbd: Remove definition of struct dfs_path.
[Samba.git] / third_party / heimdal / rebase-lorikeet.sh
blob78b80b99acdf249c11ec649a2e8f01be3a46e7ee
1 #!/bin/bash
3 # Usage copy import-lorikeet.sh and rebase-lorikeet.sh
4 # into an empty directory maybe call it update-heimdal
5 # and don't use it for any other work than importing lorikeet heimdal
6 # into samba.
8 # These parameter might be changed:
10 # heimdal_my_wip_name
11 # heimdal_my_wip_url
12 # old_lorikeet_branch
14 # you can pass skip_fetch=yes and/or skip_rebase=yes as env vars
17 # this needs to be reachable from
18 old_lorikeet_branch=$1
20 DATE=`date --utc +%Y%m%d%H%M`
22 heimdal_my_wip_name="heimdal-local"
23 heimdal_my_wip_url="/data/heimdal"
25 if test x"$old_lorikeet_branch" = x""; then
26 old_lorikeet_branch="heimdal-metze-wip/lorikeet-heimdal"
29 tmp_lorikeet_branch="lorikeet-heimdal-tmp"
30 new_lorikeet_branch="lorikeet-heimdal-${DATE}"
32 bailout() {
33 exit $1;
36 # 1. create a local heimdal repository in the heimdal subdir
38 heimdal_init() {
39 test -d heimdal || {
40 mkdir heimdal || bailout $?
41 pushd heimdal
42 git init || bailout $?
43 git remote add heimdal-git https://github.com/heimdal/heimdal.git
44 git remote add lorikeet-heimdal-abartlet ssh://git.samba.org/data/git/abartlet/lorikeet-heimdal.git/.git
45 git remote add lorikeet-heimdal https://gitlab.com/samba-team/devel/lorikeet-heimdal
46 git remote add ${heimdal_my_wip_name} ${heimdal_my_wip_url}
47 popd
50 return 0;
53 # 2. bring the repository uptodate
54 heimdal_fetch() {
55 test x"$skip_fetch" = x"yes" || {
56 pushd heimdal
57 git fetch heimdal-git || bailout $?
58 git fetch lorikeet-heimdal-abartlet || bailout $?
59 git fetch ${heimdal_my_wip_name} || bailout $?
60 popd
63 return 0;
66 # 3. rebase the old_lorikeet_branch on top of heimdals trunk
67 heimdal_rebase() {
68 test x"$skip_rebase" = x"yes" || {
69 pushd heimdal
70 echo "git update-ref"
71 git update-ref refs/heads/$tmp_lorikeet_branch $old_lorikeet_branch || bailout $?
72 echo "git checkout"
73 git checkout $tmp_lorikeet_branch || bailout $?
74 echo "git reset --hard HEAD"
75 git reset --hard HEAD
76 echo "git rebase"
77 git rebase heimdal-git/master || {
78 echo "PS1=\"'git-rebase shell'>\"" > ../.bashrc.heimdal_rebase
79 bash --rcfile ../.bashrc.heimdal_rebase || {
80 ret=$?
81 echo "git rebase --abort (just in case)"
82 git rebase --abort
83 bailout $ret
86 echo "git rebase --abort (just in case)"
87 git rebase --abort
88 echo "Now build and test the lorikeet heimdal tree"
89 echo "and exit with 0 if you want to create a $new_lorikeet_branch branch"
90 echo ""
91 echo "PS1=\"'build shell'>\"" > ../.bashrc.heimdal_build
92 bash --rcfile ../.bashrc.heimdal_build || bailout $?
93 git branch $new_lorikeet_branch $tmp_lorikeet_branch || bailout $?
94 echo "branch $new_lorikeet_branch created"
95 popd
98 return 0;
101 heimdal_init
102 heimdal_fetch
103 heimdal_rebase