1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#! /bin/bash
#
# scp2cranberry.sh
# grabs the results tarball from the test machine, copies it over to
# carnberry /srv/qa.ubuntu.com/reports/kernel-sru/, and explodes it
# there
#
# parameters:
# $1 -- tarball file name
# $2 -- test machine hostname/IP address
__help()
{
printf "$0 <tarball> <host>\n"
printf " <tarball> -- results tarball\n"
printf " <host> -- test machine hostname/IP address\n"
}
if [ -z "$1" ]; then
__help
exit 1
fi
tarBall=$1
if [ -z "$2" ]; then
__help
exit 2
fi
hostName=$2
# copy the file over here (wherever 'here' is)
scp ubuntu@$hostName:$tarBall .
if [ ! -f $tarBall ]; then
printf "for whaever reason, we failed to copy, so deal with it\n"
fi
# copy the beast over to cranberry
scp $tarBall cranberry.canonical.com:/srv/qa.ubuntu.com/reports/kernel-sru/
ssh cranberry.canonical.com "cd /srv/qa.ubuntu.com/reports/kernel-sru/ ;\
umask 002;\
tar -xvjf $tarBall"
exit $?
|