File: upload-temp-win-build.sh

package info (click to toggle)
springlobby 0.255%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 14,228 kB
  • ctags: 14,450
  • sloc: cpp: 76,178; ansic: 61,718; python: 863; sh: 654; perl: 238; xml: 52; makefile: 41; sed: 16
file content (35 lines) | stat: -rwxr-xr-x 892 bytes parent folder | download | duplicates (3)
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
#! /usr/bin/env bash

set -e


cd $(dirname $0)/../${1}
pwd
DEVELOPER=${2}

mv src/springlobby.exe .
mv src/updater/springlobby_updater.exe .
/opt/mingw32/usr/bin/i686-w64-mingw32-strip springlobby.exe
/opt/mingw32/usr/bin/i686-w64-mingw32-strip springlobby_updater.exe

if [ x$3 == x ]; then
	filename=sl_master.zip
else
	filename=sl_${3}.zip
fi

#rm -f ${filename}

zip -9 -u ${filename} springlobby.exe springlobby_updater.exe

if [ ! -d /data/www/springlobby.info/temp/builds/$DEVELOPER ] ; then
	mkdir -p /data/www/springlobby.info/temp/builds/$DEVELOPER
fi

/usr/bin/install -m 0644 ${filename} /data/www/springlobby.info/temp/builds/$DEVELOPER/${filename}

REV=$(grep -o -P '(?<=define VERSION ").*(?=")' springlobby_config.h)
echo $REV
echo $REV > /data/www/springlobby.info/temp/builds/$DEVELOPER/current.txt
chmod 0644 /data/www/springlobby.info/temp/builds/$DEVELOPER/current.txt