File: transform_release_zip.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 (36 lines) | stat: -rwxr-xr-x 630 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/env bash

set -e
cd $(dirname $0)/..

#assumes absolute path
ZIPFILE=${1}
STRIP=${2}
if [ ! -w ${ZIPFILE} ]; then
	echo "cannot write to ${ZIPFILE}"
	exit 1
fi

if [ ! -x ${STRIP} ]; then
	echo "cannot execute strip binary at ${STRIP}"
	exit 1
fi

TMPDIR=/tmp/slzip
mkdir -p ${TMPDIR}
cd ${TMPDIR}
rm -rf springlobby*
#just the filename
ZIPFILEBASE=$(echo $(basename $1))
#remove .zip postfix to get the dirname inside the zip
TOPLEVELDIR=${ZIPFILEBASE%".zip"}
unzip ${ZIPFILE}
rm ${ZIPFILE}
cd ${TOPLEVELDIR}
rm -f *pr-downloader*

$STRIP springlobby.exe
$STRIP springlobby_updater.exe

zip -r ${ZIPFILE} * locale/\*