source: unix-tarball

Last change on this file was 344:1b35fceccaaa, checked in by Jeremy Thurgood <firxen@…>, 11 years ago

Fixes.

  • Property exe set to *
File size: 1.6 KB
Line 
1#!/bin/sh
2# Copyright 2009 Simon Cross <hodgestar@gmail.com>
3# GPL - see COPYING for details
4#
5# Usage: unix-tarball
6
7OFA_VERSION=`PYTHONPATH=. python -c "from gamelib import version; print version.VERSION_STR"`
8BUILD_FOLDER="build/foxassault-${OFA_VERSION}"
9DIST_FILE="dist/foxassault-${OFA_VERSION}.tgz"
10TAR_NAME="${BUILD_FOLDER}.tar"
11
12echo "=== Creating UNIX tar ball ==="
13echo ""
14echo "  Fox Assault version: ${OFA_VERSION}"
15echo "  ---"
16echo ""
17
18rm -rf "${BUILD_FOLDER}"
19mkdir -p "${BUILD_FOLDER}"
20mkdir -p dist
21
22#
23# Export source and then copy pgu to build folder
24#
25
26echo "=== Exporting source ==="
27echo ""
28
29svn export -q gamelib "${BUILD_FOLDER}/gamelib"
30svn export -q data "${BUILD_FOLDER}/data"
31cp COPYING COPYRIGHT README.txt run_game.py "${BUILD_FOLDER}"
32find "${BUILD_FOLDER}/data" -name '*.svg' -delete
33
34#
35# Copy across pgu
36#
37
38echo "=== Copying in pgu ==="
39echo ""
40
41mkdir -p "${BUILD_FOLDER}/data/themes"
42PGU_ZIP=`find lib -name 'pgu*.zip'`
43PGU_LIB=`basename ${PGU_ZIP} .zip`
44unzip "${PGU_ZIP}" -d ${BUILD_FOLDER}
45cp -R "${BUILD_FOLDER}/${PGU_LIB}/pgu" "${BUILD_FOLDER}"
46cp -R "${BUILD_FOLDER}/${PGU_LIB}/data/themes/default" "${BUILD_FOLDER}/data/themes"
47rm -rf "${BUILD_FOLDER}/${PGU_LIB}"
48
49echo ""
50
51#
52# Create tar ball
53#
54
55echo "=== Creating tar ball ==="
56echo ""
57
58cd build
59tar czf "foxassault-${OFA_VERSION}.tgz" "foxassault-${OFA_VERSION}"
60cd ..
61mv "build/foxassault-${OFA_VERSION}.tgz" "${DIST_FILE}"
62
63echo "  Tar file: ${DIST_FILE}"
64echo "  Build folder: ${BUILD_FOLDER}"
65echo ""
66
67echo "=== Done ==="
68echo ""
69echo -n "  "; du -sh ${DIST_FILE}
70echo -n "  "; du -sh ${BUILD_FOLDER}
71echo ""
Note: See TracBrowser for help on using the repository browser.