summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorChris Gianelloni <wolf31o2@gentoo.org>2007-03-07 15:23:39 +0000
committerChris Gianelloni <wolf31o2@gentoo.org>2007-03-07 15:23:39 +0000
commiteea945e4e683e90926f15d3757b663e3e420ded0 (patch)
tree1316d307a495d3ab0a34027dc07d05dea84d5bdd /eclass
parentMIPS love. (diff)
downloadgentoo-2-eea945e4e683e90926f15d3757b663e3e420ded0.tar.gz
gentoo-2-eea945e4e683e90926f15d3757b663e3e420ded0.tar.bz2
gentoo-2-eea945e4e683e90926f15d3757b663e3e420ded0.zip
Change from using a single [ to using [[.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/games-etmod.eclass18
-rw-r--r--eclass/games-q3mod.eclass6
-rw-r--r--eclass/games-ut2k4mod.eclass26
3 files changed, 25 insertions, 25 deletions
diff --git a/eclass/games-etmod.eclass b/eclass/games-etmod.eclass
index e318a8a7ed15..4dcb60592cfc 100644
--- a/eclass/games-etmod.eclass
+++ b/eclass/games-etmod.eclass
@@ -1,6 +1,6 @@
# 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.12 2006/10/02 06:31:40 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-etmod.eclass,v 1.13 2007/03/07 15:23:39 wolf31o2 Exp $
inherit games
@@ -24,21 +24,21 @@ RDEPEND="sys-libs/glibc
S=${WORKDIR}
games-etmod_src_install() {
- [ -z "${MOD_NAME}" ] && die "what is the name of this etmod ?"
+ [[ -z "${MOD_NAME}" ]] && die "what is the name of this etmod ?"
local bdir=${GAMES_PREFIX_OPT}/enemy-territory
local mdir=${bdir}/${MOD_NAME}
MOD_BINS=${MOD_BINS:-${MOD_NAME}}
- if [ -d ${MOD_NAME} ] ; then
+ if [[ -d ${MOD_NAME} ]] ; then
dodir "${bdir}"
cp -PR ${MOD_NAME} "${D}/${bdir}/"
fi
- if [ -d etmain ] ; then
+ if [[ -d etmain ]] ; then
dodir "${bdir}"
cp -PR etmain "${D}/${bdir}/"
fi
- if [ ! -z "`ls "${S}"/* 2> /dev/null`" ] ; then
+ if [[ ! -z "`ls "${S}"/* 2> /dev/null`" ]] ; then
dodir "${mdir}"
cp -PR "${S}"/* "${D}/${mdir}/"
fi
@@ -73,7 +73,7 @@ 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
+ if [[ -e "${samplecfg}" ]] && [[ ! -e "${realcfg}" ]] ; then
cp "${samplecfg}" "${realcfg}"
fi
@@ -118,12 +118,12 @@ start() {
stop() {
ebegin "Stopping ${MOD_NAME} dedicated"
local pid=\`screen -list | grep et-${MOD_BINS}-ded | awk -F . '{print \$1}' | sed -e s/.//\`
- if [ -z "\${pid}" ] ; then
+ if [[ -z "\${pid}" ]] ; then
eend 1 "Lost screen session"
else
pid=\`pstree -p \${pid} | sed -e 's:^.*etded\.x86::'\`
pid=\${pid:1:\${#pid}-2}
- if [ -z "\${pid}" ] ; then
+ if [[ -z "\${pid}" ]] ; then
eend 1 "Lost etded session"
else
kill \${pid}
@@ -139,7 +139,7 @@ EOF
}
games-etmod_make_conf.d() {
- if [ -e "${FILESDIR}"/${MOD_NAME}.conf.d ] ; then
+ if [[ -e "${FILESDIR}"/${MOD_NAME}.conf.d ]] ; then
cp "${FILESDIR}"/${MOD_NAME}.conf.d "${T}"/et-${MOD_NAME}-ded.conf.d
return 0
fi
diff --git a/eclass/games-q3mod.eclass b/eclass/games-q3mod.eclass
index f8900b1385c0..3440889a3f19 100644
--- a/eclass/games-q3mod.eclass
+++ b/eclass/games-q3mod.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-q3mod.eclass,v 1.35 2006/10/05 18:54:37 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-q3mod.eclass,v 1.36 2007/03/07 15:23:39 wolf31o2 Exp $
inherit games
@@ -110,12 +110,12 @@ start() {
stop() {
ebegin "Stopping ${MOD_NAME} dedicated"
local pid=\`screen -list | grep q3${MOD_BINS}-ded | awk -F . '{print \$1}' | sed -e s/.//\`
- if [ -z "\${pid}" ] ; then
+ if [[ -z "\${pid}" ]] ; then
eend 1 "Lost screen session"
else
pid=\`pstree -p \${pid} | sed -e 's:^.*q3ded::'\`
pid=\${pid:1:\${#pid}-2}
- if [ -z "\${pid}" ] ; then
+ if [[ -z "\${pid}" ]] ; then
eend 1 "Lost q3ded session"
else
kill \${pid}
diff --git a/eclass/games-ut2k4mod.eclass b/eclass/games-ut2k4mod.eclass
index 088916031593..7a01b96fc98b 100644
--- a/eclass/games-ut2k4mod.eclass
+++ b/eclass/games-ut2k4mod.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-ut2k4mod.eclass,v 1.9 2006/09/28 21:32:12 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-ut2k4mod.eclass,v 1.10 2007/03/07 15:23:39 wolf31o2 Exp $
inherit games
@@ -29,16 +29,16 @@ check_dvd() {
# to bugs.gentoo.org as I know it is a very ugly hack.
USE_DVD=
USE_ECE_DVD=
- if [ -n "${CD_ROOT}" ]
+ if [[ -n "${CD_ROOT}" ]]
then
- [ -d "${CD_ROOT}/CD1" ] && USE_DVD=1
- [ -d "${CD_ROOT}/CD7" ] && USE_ECE_DVD=1
+ [[ -d "${CD_ROOT}/CD1" ]] && USE_DVD=1
+ [[ -d "${CD_ROOT}/CD7" ]] && USE_ECE_DVD=1
else
local mline=""
for mline in `mount | egrep -e '(iso|cdrom)' | awk '{print $3}'`
do
- [ -d "${mline}/CD1" ] && USE_DVD=1
- [ -d "${mline}/CD7" ] && USE_ECE_DVD=1
+ [[ -d "${mline}/CD1" ]] && USE_DVD=1
+ [[ -d "${mline}/CD7" ]] && USE_ECE_DVD=1
done
fi
}
@@ -49,8 +49,8 @@ games-ut2k4mod_pkg_nofetch() {
}
games-ut2k4mod_src_unpack() {
- [ -z "${MOD_TBZ2}" ] && die "what are we supposed to unpack ?"
- [ -z "${MOD_NAME}" ] && die "what is the name of this ut2k4mod ?"
+ [[ -z "${MOD_TBZ2}" ]] && die "what are we supposed to unpack ?"
+ [[ -z "${MOD_NAME}" ]] && die "what is the name of this ut2k4mod ?"
for src_uri in ${A}
do
@@ -73,15 +73,15 @@ games-ut2k4mod_src_unpack() {
mkdir ${S}/unpack
for tarball in ${MOD_TBZ2}
do
- if [ -e "${tarball}_${PV}-english.tar.bz2" ]
+ if [[ -e "${tarball}_${PV}-english.tar.bz2" ]]
then
tar xjf ${tarball}_${PV}-english.tar.bz2 -C ${S}/unpack \
|| die "uncompressing tarball"
- elif [ -e "${tarball}_${PV}.tar.bz2" ]
+ elif [[ -e "${tarball}_${PV}.tar.bz2" ]]
then
tar xjf ${tarball}_${PV}.tar.bz2 -C ${S}/unpack \
|| die "uncompressing tarball"
- else [ -e "${tarball}.tar.bz2" ]
+ else [[ -e "${tarball}.tar.bz2" ]]
tar xjf ${tarball}.tar.bz2 -C ${S}/unpack \
|| die "uncompressing tarball"
fi
@@ -96,7 +96,7 @@ games-ut2k4mod_src_install() {
do
dodoc ${readme} || die "dodoc failed"
done
- if [ -n "${MOD_BINS}" ]
+ if [[ -n "${MOD_BINS}" ]]
then
exeinto ${dir}
doexe bin/${MOD_BINS} || die "doexe failed"
@@ -110,7 +110,7 @@ games-ut2k4mod_src_install() {
}
games-ut2k4mod_pkg_postinst() {
- if [ -n "${MOD_BINS}" ]
+ if [[ -n "${MOD_BINS}" ]]
then
einfo "To play this mod run:"
einfo " ${MOD_BINS}"