bzr branch
http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar
|
699
by Martin Pool
- simpleminded patchwork client in shell |
1 |
#! /bin/sh -pe
|
2 |
||
3 |
# take patches from patchwork into bzr
|
|
4 |
||
5 |
# authentication must be in ~/.netrc
|
|
6 |
||
7 |
||
8 |
PWK_ROOT='http://patchwork.ozlabs.org/bazaar-ng' |
|
9 |
PWK_AUTH_ROOT='https://patchwork.ozlabs.org/bazaar-ng' |
|
10 |
||
11 |
usage() { |
|
12 |
echo "usage: pwk cat PATCH-ID" >&2 |
|
13 |
}
|
|
14 |
||
15 |
catpatch() { |
|
16 |
curl --get -d id=$1 $PWK_ROOT/patchcontent |
|
17 |
}
|
|
18 |
||
19 |
if [ $# -ne 2 ] |
|
20 |
then
|
|
21 |
usage
|
|
22 |
exit 1 |
|
23 |
fi
|
|
24 |
||
25 |
||
26 |
case "$1" in |
|
27 |
cat)
|
|
28 |
catpatch $2 |
|
29 |
;; |
|
30 |
try)
|
|
31 |
catpatch $2 | patch -p0 --dry-run |
|
32 |
;; |
|
33 |
*)
|
|
34 |
usage
|
|
35 |
exit 1 |
|
36 |
esac
|