1
0
mirror of https://github.com/minetest-mods/irc.git synced 2024-11-18 15:40:23 +01:00
irc/etc/zipmod.sh

46 lines
784 B
Bash
Raw Normal View History

2012-12-14 23:33:44 +01:00
#! /bin/bash
# ONLY FOR MAINTAINER USE!!
2012-12-15 18:00:40 +01:00
t="`pwd`";
cd "`dirname "$0"`/..";
basedir="`pwd`";
cd "$t";
2012-12-19 00:11:55 +01:00
ver=0.1.2;
2012-12-14 23:33:44 +01:00
do_make() # [PLATFORM]
{
TC_FILE='';
BLD_SFX='';
if [ "$1" ]; then
2012-12-15 00:31:48 +01:00
TC_FILE="-DCMAKE_TOOLCHAIN_FILE=cmake/x-$1.cmake";
2012-12-14 23:33:44 +01:00
BLD_SFX="-$1";
fi
2012-12-15 18:00:40 +01:00
cd "$basedir";
2012-12-14 23:33:44 +01:00
mkdir -p Build$BLD_SFX;
cd Build$BLD_SFX;
cmake $TC_FILE .. || exit;
make || exit;
make pack_mod || exit;
cd ..;
}
2012-12-15 18:00:40 +01:00
mkdir -p "$basedir/dists"
2012-12-14 23:33:44 +01:00
# Native Version
2012-12-15 18:00:40 +01:00
(do_make \
&& cd Build \
&& tar cfz "$basedir/dists/Kaeza-irc-$ver-`uname -s`-`uname -p`.tar.gz" irc \
) || exit;
2012-12-14 23:33:44 +01:00
# Linux -> MinGW32 Crosscompiler
2012-12-15 18:00:40 +01:00
(do_make i586-mingw32msvc \
&& cd Build-i586-mingw32msvc \
&& zip -r "$basedir/dists/Kaeza-irc-$ver-Win32.zip" irc \
) || exit;