summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2006-10-02 06:31:40 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2006-10-02 06:31:40 +0000
commit19ffc44490ec21cec0e01c1aaad420830d8e14d1 (patch)
treefc082a0de5940b5e78b697233f3cb1c714a4b431 /eclass/games-etmod.eclass
parentAdd patch to build with GCC 4.1, thanks to David Cunningham in bug #140288. (diff)
downloadgentoo-2-19ffc44490ec21cec0e01c1aaad420830d8e14d1.tar.gz
gentoo-2-19ffc44490ec21cec0e01c1aaad420830d8e14d1.tar.bz2
gentoo-2-19ffc44490ec21cec0e01c1aaad420830d8e14d1.zip
quote party
Diffstat (limited to 'eclass/games-etmod.eclass')
-rw-r--r--eclass/games-etmod.eclass54
1 files changed, 27 insertions, 27 deletions
diff --git a/eclass/games-etmod.eclass b/eclass/games-etmod.eclass
index 1cdee6dec5a4..e318a8a7ed15 100644
--- a/eclass/games-etmod.eclass
+++ b/eclass/games-etmod.eclass
@@ -1,10 +1,9 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-etmod.eclass,v 1.11 2006/09/29 14:34:19 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-etmod.eclass,v 1.12 2006/10/02 06:31:40 mr_bones_ Exp $
inherit games
-
EXPORT_FUNCTIONS src_install pkg_postinst
DESCRIPTION="Enemy Territory - ${MOD_DESC}"
@@ -32,40 +31,40 @@ games-etmod_src_install() {
MOD_BINS=${MOD_BINS:-${MOD_NAME}}
if [ -d ${MOD_NAME} ] ; then
- dodir ${bdir}
- cp -PR ${MOD_NAME} ${D}/${bdir}/
+ dodir "${bdir}"
+ cp -PR ${MOD_NAME} "${D}/${bdir}/"
fi
if [ -d etmain ] ; then
- dodir ${bdir}
- cp -PR etmain ${D}/${bdir}/
+ dodir "${bdir}"
+ cp -PR etmain "${D}/${bdir}/"
fi
- if [ ! -z "`ls ${S}/* 2> /dev/null`" ] ; then
- dodir ${mdir}
- cp -PR ${S}/* ${D}/${mdir}/
+ if [ ! -z "`ls "${S}"/* 2> /dev/null`" ] ; then
+ dodir "${mdir}"
+ cp -PR "${S}"/* "${D}/${mdir}/"
fi
if use dedicated; then
games-etmod_make_etded_exec
- newgamesbin ${T}/et-${MOD_NAME}-ded.bin et-${MOD_BINS}-ded
+ newgamesbin "${T}"/et-${MOD_NAME}-ded.bin et-${MOD_BINS}-ded
fi
if use opengl; then
games-etmod_make_enemy-territory_exec
- newgamesbin ${T}/et-${MOD_NAME}.bin et-${MOD_BINS}
+ newgamesbin "${T}"/et-${MOD_NAME}.bin et-${MOD_BINS}
fi
if use dedicated; then
games-etmod_make_init.d
- newinitd ${T}/et-${MOD_NAME}-ded.init.d et-${MOD_BINS}-ded
+ newinitd "${T}"/et-${MOD_NAME}-ded.init.d et-${MOD_BINS}-ded
games-etmod_make_conf.d
- newconfd ${T}/et-${MOD_NAME}-ded.conf.d et-${MOD_BINS}-ded
+ newconfd "${T}"/et-${MOD_NAME}-ded.conf.d et-${MOD_BINS}-ded
- dodir ${GAMES_SYSCONFDIR}/enemy-territory
+ dodir "${GAMES_SYSCONFDIR}"/enemy-territory
- dodir ${bdir}/etwolf-homedir
- dosym ${bdir}/etwolf-homedir ${GAMES_PREFIX}/.wolfet
+ dodir "${bdir}"/etwolf-homedir
+ dosym "${bdir}"/etwolf-homedir "${GAMES_PREFIX}"/.wolfet
keepdir ${bdir}/etwolf-homedir
- chmod g+rw ${D}/${mdir} ${D}/${bdir}/etwolf-homedir
- chmod -R g+rw ${D}/${GAMES_SYSCONFDIR}/enemy-territory
+ chmod g+rw "${D}/${mdir}" "${D}/${bdir}"/etwolf-homedir
+ chmod -R g+rw "${D}/${GAMES_SYSCONFDIR}"/enemy-territory
fi
prepgamesdirs
}
@@ -73,8 +72,9 @@ games-etmod_src_install() {
games-etmod_pkg_postinst() {
local samplecfg=${FILESDIR}/server.cfg
local realcfg=${GAMES_PREFIX_OPT}/enemy-territory/${MOD_NAME}/server.cfg
- if [ -e ${samplecfg} ] && [ ! -e ${realcfg} ] ; then
- cp ${samplecfg} ${realcfg}
+
+ if [ -e "${samplecfg}" ] && [ ! -e "${realcfg}" ] ; then
+ cp "${samplecfg}" "${realcfg}"
fi
use opengl && einfo "To play this mod: et-${MOD_BINS}"
@@ -87,21 +87,21 @@ games-etmod_pkg_postinst() {
}
games-etmod_make_etded_exec() {
-cat << EOF > ${T}/et-${MOD_NAME}-ded.bin
+cat << EOF > "${T}"/et-${MOD_NAME}-ded.bin
#!/bin/sh
exec ${GAMES_BINDIR}/et-ded +set fs_game ${MOD_NAME} +set dedicated 1 +exec server.cfg \${@}
EOF
}
games-etmod_make_enemy-territory_exec() {
-cat << EOF > ${T}/et-${MOD_NAME}.bin
+cat << EOF > "${T}"/et-${MOD_NAME}.bin
#!/bin/sh
-exec ${GAMES_BINDIR}/et +set fs_game ${MOD_NAME} \${@}
+exec "${GAMES_BINDIR}"/et +set fs_game ${MOD_NAME} \${@}
EOF
}
games-etmod_make_init.d() {
-cat << EOF > ${T}/et-${MOD_NAME}-ded.init.d
+cat << EOF > "${T}"/et-${MOD_NAME}-ded.init.d
#!/sbin/runscript
$(<${PORTDIR}/header.txt)
@@ -139,11 +139,11 @@ EOF
}
games-etmod_make_conf.d() {
- if [ -e ${FILESDIR}/${MOD_NAME}.conf.d ] ; then
- cp ${FILESDIR}/${MOD_NAME}.conf.d ${T}/et-${MOD_NAME}-ded.conf.d
+ if [ -e "${FILESDIR}"/${MOD_NAME}.conf.d ] ; then
+ cp "${FILESDIR}"/${MOD_NAME}.conf.d "${T}"/et-${MOD_NAME}-ded.conf.d
return 0
fi
-cat << EOF > ${T}/et-${MOD_NAME}-ded.conf.d
+cat << EOF > "${T}"/et-${MOD_NAME}-ded.conf.d
$(<${PORTDIR}/header.txt)
# Any extra options you want to pass to the dedicated server