~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to contrib/pwk

  • Committer: Martin Pool
  • Date: 2005-05-03 07:48:54 UTC
  • Revision ID: mbp@sourcefrog.net-20050503074854-adb6f9d6382e27a9
- sketchy experiments in bash and zsh completion

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
 
b'\\ No newline at end of file'