diff options
author | Tim Angus <tim@ngus.net> | 2005-12-10 02:56:06 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2005-12-10 02:56:06 +0000 |
commit | 08446c16acbbb9a9d12fccb21e27cfa29d076e77 (patch) | |
tree | 1dc6a6fd6c9baa4a56e01abb84601368b5de80a1 /ioq3-r437/src/unix/setup/doit | |
parent | 7ba4af6168b726759d45b8d9d95dbebe26aa3186 (diff) |
* Branch upstream ioq3-r437 into trunk
Diffstat (limited to 'ioq3-r437/src/unix/setup/doit')
-rwxr-xr-x | ioq3-r437/src/unix/setup/doit | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/ioq3-r437/src/unix/setup/doit b/ioq3-r437/src/unix/setup/doit new file mode 100755 index 00000000..a3c8e0a3 --- /dev/null +++ b/ioq3-r437/src/unix/setup/doit @@ -0,0 +1,65 @@ +#!/bin/bash + +: ${MAKESELF:=/usr/share/loki-setup/makeself} +: ${SETUPIMAGE:=/usr/share/loki-setup/image} + +: ${VERSION:=0.0_`date +%Y%m%d%H%M`} +: ${RELEASE:=0} + +set -e +set -x + +arch=`uname -m` + +# $ยง&%!! +setup_arch=$arch +links= +case "$arch" in + i?86) arch=i386; setup_arch=x86; links="amd64 x86_64" ;; + x86_64) links=amd64 +esac + +rm -rf image +mkdir image + +### loki-setup files +cp -a $SETUPIMAGE/{setup.data,setup.sh} image/ + +### splash +rm -f image/setup.data/splash.xpm +[ -e splash.xpm ] && cp splash.xpm image/setup.data/splash.xpm + +### binaries +mkdir image/tmp +pushd image/tmp +mkdir baseq3 demoq3 missionpack +src="../../../release$arch-glibc/" +install -m 755 $src/linuxquake3 ioquake3.$arch +install -m 755 $src/linuxq3ded ioq3ded.$arch +install -m 644 $src/baseq3/*.so baseq3 +install -m 644 $src/missionpack/*.so missionpack +pushd demoq3 +ln -s ../baseq3/*.so . +popd +popd + +tar --owner=root --group=root -C image/tmp -cf image/ioquake3.tar . +rm -rf image/tmp + +### setup.xml +sed 's/@VERSION@/'$VERSION'/g' < setup.xml > image/setup.data/setup.xml + +### start script +mkdir -p image/bin/Linux/$setup_arch +for i in $links; do + ln -s $setup_arch image/bin/Linux/$i +done +install -m 755 ioquake3.sh image/bin/Linux/$setup_arch/ioquake3 +install -m 755 ioq3demo.sh image/bin/Linux/$setup_arch/ioq3demo + +### README and COPYING +install -m 644 ../../../README image/README +install -m 644 ../../../COPYING.txt image/COPYING + +### makeself installer +$MAKESELF/makeself.sh image ioquake3-$VERSION-$RELEASE.$arch.run "icculus.org/quake3 $VERSION" ./setup.sh |