-
Notifications
You must be signed in to change notification settings - Fork 3
/
BuildAndPush
executable file
·42 lines (34 loc) · 1.64 KB
/
BuildAndPush
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
#
#
# A hacky script to freshly compile and distribute the dispense client
set -o errexit
set -o nounset
CLIENT_PATH=/usr/local/bin/dispense
EXTRA="true"
EXTRA=$EXTRA";mkdir -p /etc/opendispense/"
EXTRA=$EXTRA";cp ~tpg/gitclones/opendispense2/client.cfg /etc/opendispense/client.cfg"
#EXTRA="chown root:root $CLIENT_PATH; chmod u+s $CLIENT_PATH"
MAKEMAN="make -C ~tpg/gitclones/opendispense2/docs/"
cd ~/gitclones/opendispense2
git pull github master
make -C src/ clean all
#ssh-add
ssh-add -l ~/.ssh/wh > /dev/null || ssh-add ~/.ssh/wh
SSH='ssh -i '$HOME'/.ssh/wh'
# Build 32-bit version
ssh tpg@mussel 'cd ~/gitclones/opendispense2_32bit; git pull; make -C src/client clean all'
# Store the client and manpages for /away hosts
cp ~/gitclones/opendispense2_32bit/dispense /away/wheel/tpg/dispense_32bit
cp ~/gitclones/opendispense2/dispense /away/wheel/tpg/dispense_64bit
cp /usr/share/man/man1/dispense.1.gz /away/wheel/tpg/dispense.1.gz
# Copy 32-bit
$SSH root@mussel "cp ~tpg/gitclones/opendispense2_32bit/dispense $CLIENT_PATH; $EXTRA; $MAKEMAN"
$SSH root@mooneye "cp ~tpg/gitclones/opendispense2_32bit/dispense $CLIENT_PATH; $EXTRA; $MAKEMAN"
# Copy 64-bit
$SSH root@motsugo "cp ~tpg/gitclones/opendispense2/dispense $CLIENT_PATH; $EXTRA; $MAKEMAN"
#$SSH root@mantis "cp ~tpg/gitclones/opendispense2/dispense $CLIENT_PATH; $EXTRA; $MAKEMAN"
#$SSH root@martello "cp ~tpg/gitclones/opendispense2/dispense $CLIENT_PATH; $EXTRA; $MAKEMAN"
$SSH root@merlo "cp ~tpg/gitclones/opendispense2/dispense $CLIENT_PATH; $EXTRA; $MAKEMAN"
# Copy Away version
$SSH root@meersau "cp ~tpg/dispense_32bit $CLIENT_PATH; cp ~tpg/dispense.1.gz /usr/share/man/man1/dispense.1.gz"