Last change
on this file since 5555:e2230ec286e8 was
5555:e2230ec286e8,
checked in by phi, 11 years ago
|
Update to allow sending other packages as well.
This is useful to test packages closely related to this like rpld.
|
|
File size:
1.9 KB
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | |
---|
3 | REMOTEHOST='' |
---|
4 | REMOTEDIR='.' |
---|
5 | |
---|
6 | CONFIGURE=true |
---|
7 | BUILD=true |
---|
8 | TEST=true |
---|
9 | PORT='' |
---|
10 | REV='HEAD' |
---|
11 | PACKAGE='roaraudio' |
---|
12 | |
---|
13 | SSH_OPTS='' |
---|
14 | |
---|
15 | while [ "$1" != '' ] |
---|
16 | do |
---|
17 | case "$1" in |
---|
18 | '-h'|'--help') |
---|
19 | echo "Usage: $0 [OPTIONS] host..." |
---|
20 | echo |
---|
21 | cat <<HELP |
---|
22 | -h --help - Show this help |
---|
23 | --remote-dir=DIR - Set dir on remote site |
---|
24 | --build={true|false} - build on remote site? |
---|
25 | --configure={true,false} - configure on remote site? |
---|
26 | --test={true,false} - test on remote site? |
---|
27 | --port=PORT - Set port of remote site |
---|
28 | --rev=REVISION - Set the revision (or tag) to send |
---|
29 | --package=PACKAGE - Set package to export (default: roaraudio) |
---|
30 | HELP |
---|
31 | exit 0; |
---|
32 | ;; |
---|
33 | '--remote-dir='*) |
---|
34 | REMOTEDIR=`echo "$1" | cut -d= -f2` |
---|
35 | ;; |
---|
36 | '--build='*) |
---|
37 | BUILD=`echo $1 | cut -d= -f2` |
---|
38 | ;; |
---|
39 | '--configure='*) |
---|
40 | CONFIGURE=`echo $1 | cut -d= -f2` |
---|
41 | ;; |
---|
42 | '--test='*) |
---|
43 | TEST=`echo $1 | cut -d= -f2` |
---|
44 | ;; |
---|
45 | '--port='*) |
---|
46 | PORT=`echo $1 | cut -d= -f2` |
---|
47 | ;; |
---|
48 | '--rev='*) |
---|
49 | REV=`echo $1 | cut -d= -f2` |
---|
50 | ;; |
---|
51 | '--package='*) |
---|
52 | PACKAGE=`echo $1 | cut -d= -f2` |
---|
53 | ;; |
---|
54 | *) |
---|
55 | REMOTEHOST="$1" |
---|
56 | ;; |
---|
57 | esac |
---|
58 | shift |
---|
59 | done |
---|
60 | |
---|
61 | if [ "$PORT" != '' ] |
---|
62 | then |
---|
63 | SSH_OPTS="-p $PORT $SSH_OPTS" |
---|
64 | fi |
---|
65 | |
---|
66 | SSH_OPTS="$SSH_OPTS $REMOTEHOST" |
---|
67 | |
---|
68 | $CONFIGURE || BUILD=false |
---|
69 | $BUILD || TEST=false |
---|
70 | |
---|
71 | LOCALDIR="sra-@$REMOTEHOST" |
---|
72 | |
---|
73 | mkdir $LOCALDIR |
---|
74 | |
---|
75 | cd $LOCALDIR |
---|
76 | cvs co -r $REV $PACKAGE |
---|
77 | cd .. |
---|
78 | |
---|
79 | { |
---|
80 | echo '#!/bin/sh' |
---|
81 | echo |
---|
82 | |
---|
83 | echo 'MAKE=`which gmake make 2> /dev/null | grep ^/ | head -n 1`' |
---|
84 | |
---|
85 | echo 'cd $PACKAGE' |
---|
86 | |
---|
87 | $CONFIGURE && echo './configure || exit 1' |
---|
88 | $BUILD && echo '$MAKE || exit 2' |
---|
89 | $TEST && echo '$MAKE test || exit 3' |
---|
90 | |
---|
91 | echo 'exit 0' |
---|
92 | echo '#ll' |
---|
93 | } > $LOCALDIR/setup |
---|
94 | chmod +rx $LOCALDIR/setup |
---|
95 | |
---|
96 | tar -czf - $LOCALDIR | ssh $SSH_OPTS "cd $REMOTEDIR && rm -rf $LOCALDIR/$PACKAGE && gunzip | tar -xvf - && cd $LOCALDIR && ./setup" |
---|
97 | |
---|
98 | rm -rf $LOCALDIR |
---|
99 | |
---|
100 | #ll |
---|
Note: See
TracBrowser
for help on using the repository browser.