File: install

package info (click to toggle)
sshproxy 0.6.0~beta2-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 956 kB
  • ctags: 1,296
  • sloc: python: 8,932; sh: 268; sql: 40; makefile: 38; xml: 21
file content (48 lines) | stat: -rwxr-xr-x 1,208 bytes parent folder | download
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
42
43
44
45
46
47
48
#!/bin/bash

# this is a helper script to test a new ebuild
# of course, this works only if you change the SRC_URI in
# the ebuild and the following lines:
SRC_URI_UPLOAD=penguin:sshproxy/download
UPLOAD_METHOD=scp  # change to scp if you don't run sshproxyd
TMP_DIR=/tmp


# start real work
version=$1

if [ -z "$version" ]; then
    echo "Usage: $0 <version>"
    exit 1
fi

tarball="$TMP_DIR"/sshproxy-${version}.tar.gz
gentoo="$(dirname $0)"


# cleanup old files
sudo rm -f /usr/portage/distfiles/sshproxy-${version}.tar.gz
rm -f "$tarball"
rm -f "$gentoo"/net-proxy/sshproxy/Manifest
rm -f "$gentoo"/net-proxy/sshproxy/files/digest-sshproxy-${version}

# generate the new tarball
cg-export "$tarball"

# upload it
$UPLOAD_METHOD "$tarball" $SRC_URI_UPLOAD
ret=$?
if [ $ret -ne 0 ]; then
    echo "Problem($ret) uploading $tarball to $SRC_URI_UPLOAD"
    echo "Did you start sshproxyd ?"
    exit 1
fi

# generate the new digest
ebuild "$gentoo"/net-proxy/sshproxy/sshproxy-${version}.ebuild digest

# remove the tarball to make sure it does corrspond to the digest at install
sudo rm -f /usr/portage/distfiles/sshproxy-${version}.tar.gz

# let's install!
sudo emerge -av =net-proxy/sshproxy-${version}