forked from hyphanet/scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
testnet-wininstaller
executable file
·69 lines (62 loc) · 3.69 KB
/
testnet-wininstaller
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/bash
MAINVER="TESTNET 0.7.5"
echo Clearing ~freenet-buildwin
rm -Rf ~freenet-buildwin/*
rm -Rf ~freenet-buildwin/.[a-zA-Z0-9]*
mkdir ~freenet-buildwin/.ssh
cat ~/.ssh/id_rsa.pub > ~freenet-buildwin/.ssh/authorized_keys
chmod 700 ~freenet-buildwin/.ssh
mkdir ~freenet-buildwin/bin
(echo "cd tmp" ; echo "cd testnet-wininstaller" ; echo "wine cmd /c build.cmd") > ~freenet-buildwin/bin/build-alpha
mkdir ~freenet-buildwin/tmp
cp -a /usr/src/cvs/eclipse-workspace/testnet-wininstaller ~freenet-buildwin/tmp
(cd ~freenet-buildwin/tmp/testnet-wininstaller; git checkout alpha)
echo Copied
GITVERSION=`cd ~freenet-buildwin/tmp/testnet-wininstaller && git describe --always --abbrev=40`
if [[ -z $GITVERSION ]]; then echo Could not get git version; exit 1; fi
echo Git version is $GITVERSION
rm -Rf ~freenet-buildwin/tmp/testnet-wininstaller/.git
mkdir ~freenet-buildwin/tmp/testnet-wininstaller/lib
# Copy files
ln -s /usr/src/cvs/eclipse-workspace/FreenetReleased/testnet.jar ~freenet-buildwin/tmp/testnet-wininstaller/res/install_node/freenet-testnet.jar || exit
ln -s /usr/src/cvs/eclipse-workspace/FreenetReleased/freenet-ext.jar ~freenet-buildwin/tmp/testnet-wininstaller/res/install_node/freenet-ext.jar || exit
cp /usr/src/cvs/eclipse-workspace/FreenetReleased/seednodes-testnet.fref ~freenet-buildwin/tmp/testnet-wininstaller/res/install_node/seednodes-testnet.fref || exit
for x in JSTUN KeyUtils ThawIndexBrowser UPnP Library; do
ln -s /usr/src/cvs/eclipse-workspace/FreenetReleased/${x}.jar ~freenet-buildwin/tmp/testnet-wininstaller/res/install_node/plugins/${x}.jar || exit
done
cp ~freenet-buildwin/tmp/testnet-wininstaller/bin/Ahk2Exe.exe ~freenet-buildwin/tmp/testnet-wininstaller/bin/AutoHotkeySC.bin ~freenet-buildwin/tmp/testnet-wininstaller/res/tool_ahk/
echo Copied dependancies.
VERSION=`cat /usr/src/cvs/eclipse-workspace/FreenetReleased/testnet.build`
echo VERSION is $VERSION
echo Updating build
(cd ~freenet-buildwin/tmp/testnet-wininstaller; cat src/freenetinstaller/FreenetInstaller_Include_Info.inc | sed "s/_Inc_FreenetBuild = \#[0-9]\\+/_Inc_FreenetBuild = \#$VERSION/" > 1; cat 1 > src/freenetinstaller/FreenetInstaller_Include_Info.inc; cat 1)
chown -R freenet-buildwin.freenet-buildwin ~freenet-buildwin
chmod +x ~freenet-buildwin/bin/build-alpha
echo Running the build
rm ~freenet-buildwin/tmp/testnet-wininstaller/bin/*
eval `ssh-agent -s`
ssh-add
ssh -n freenet-buildwin@localhost xvfb-run ~freenet-buildwin/bin/build-alpha
kill -9 `pgrep -u freenet-buildwin`
cd
mkdir -p tmp-wi
cd tmp-wi
rm *
cp ~freenet-buildwin/tmp/testnet-wininstaller/bin/TestnetInstaller.exe TestnetInstaller-${VERSION}.exe
cd ~freenet-buildwin/tmp/testnet-wininstaller/res/install_node/updater/ || exit
sha1sum update-testnet.cmd > update-testnet.cmd.sha1 || exit
cd ~/tmp-wi
rsync ~freenet-buildwin/tmp/testnet-wininstaller/res/install_node/updater/update-testnet*cmd* osprey.vm.bytemark.co.uk:/var/www/downloads/alpha/update/
echo Uploading
cp TestnetInstaller-${VERSION}.exe ~toad/
echo Signing
su - toad -c "gpg --sign --detach-sign TestnetInstaller-${VERSION}.exe"
cp ~toad/TestnetInstaller-${VERSION}.exe.sig .
echo Uploading to Google Code
cp TestnetInstaller-${VERSION}.exe ~browser/
chmod a+r ~browser/TestnetInstaller-${VERSION}.exe
echo Uploading to emu
rsync -v TestnetInstaller-${VERSION}.exe* osprey.vm.bytemark.co.uk:/var/www/downloads/alpha/installer/
cp TestnetInstaller-${VERSION}.exe* /usr/src/cvs/eclipse-workspace/FreenetReleased/testnet/
ssh osprey.vm.bytemark.co.uk -- "cp /var/www/downloads/alpha/.registry .; cat /var/www/downloads/alpha/.registry | sed \"s/TestnetInstaller.exe .*$/TestnetInstaller.exe installer\/TestnetInstaller-${VERSION}.exe/\" > new-registry ; cat new-registry > /var/www/downloads/alpha/.registry"
ssh-agent -k