Gentoo Archives: gentoo-commits

From: "Tristan Heaven (nyhm)" <nyhm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: games-mods.eclass
Date: Wed, 30 Sep 2009 23:58:44
Message-Id: E1Mt94E-0004xM-Nh@stork.gentoo.org
1 nyhm 09/09/30 23:58:42
2
3 Modified: games-mods.eclass
4 Log:
5 use consistent style
6
7 Revision Changes Path
8 1.22 eclass/games-mods.eclass
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.22&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.22&content-type=text/plain
12 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?r1=1.21&r2=1.22
13
14 Index: games-mods.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v
17 retrieving revision 1.21
18 retrieving revision 1.22
19 diff -u -r1.21 -r1.22
20 --- games-mods.eclass 30 Sep 2009 23:40:17 -0000 1.21
21 +++ games-mods.eclass 30 Sep 2009 23:58:42 -0000 1.22
22 @@ -1,6 +1,6 @@
23 # Copyright 1999-2009 Gentoo Foundation
24 # Distributed under the terms of the GNU General Public License v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.21 2009/09/30 23:40:17 nyhm Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.22 2009/09/30 23:58:42 nyhm Exp $
27
28 # Variables to specify in an ebuild which uses this eclass:
29 # GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
30 @@ -126,8 +126,7 @@
31
32 games-mods_src_unpack() {
33 # The first thing we do here is determine exactly what we're dealing with
34 - for src_uri in ${A}
35 - do
36 + for src_uri in ${A} ; do
37 URI_SUFFIX="${src_uri##*.}"
38 case ${URI_SUFFIX##*.} in
39 bin|run)
40 @@ -145,13 +144,10 @@
41 done
42
43 # This code should only be executed for Makeself archives
44 - for tarball in ${MOD_TBZ2}
45 - do
46 + for tarball in ${MOD_TBZ2} ; do
47 mkdir -p "${S}"/unpack
48 - for name in "${tarball}_${PV}-english" "${tarball}_${PV}" "${tarball}"
49 - do
50 - for ext in tar.bz2 tar.gz tbz2 tgz
51 - do
52 + for name in "${tarball}_${PV}-english" "${tarball}_${PV}" "${tarball}" ; do
53 + for ext in tar.bz2 tar.gz tbz2 tgz ; do
54 if [[ -e "${name}.${ext}" ]] ; then
55 tar xf "${name}.${ext}" -C "${S}"/unpack \
56 || die "uncompressing tarball"
57 @@ -183,8 +179,7 @@
58 cd "${S}"
59
60 # If we have a README, install it
61 - for readme in README*
62 - do
63 + for readme in README* ; do
64 if [[ -s "${readme}" ]] ; then
65 dodoc "${readme}" || die "dodoc failed"
66 fi
67 @@ -210,8 +205,7 @@
68
69 # Set up command-line and desktop menu entries
70 if [[ -n "${MOD_BINS}" ]] ; then
71 - for binary in ${MOD_BINS}
72 - do
73 + for binary in ${MOD_BINS} ; do
74 if [[ -n "${MOD_DIR}" ]] ; then
75 games_make_wrapper "${GAME_EXE}-${MOD_BINS}" \
76 "${GAME_EXE} ${SELECT_MOD}${MOD_DIR}" "${dir}" "${dir}"
77 @@ -236,8 +230,7 @@
78 if [[ "${bin_name}" == "${binary}" ]] ; then
79 bin_name=${MOD_NAME}
80 else
81 - for tmp1 in ${bin_name}
82 - do
83 + for tmp1 in ${bin_name} ; do
84 tmp2=$(echo ${tmp1} | cut -b1 | tr [[:lower:]] \
85 [[:upper:]])
86 tmp3=$(echo ${tmp1} | cut -b2-)
87 @@ -302,8 +295,7 @@
88 # directory structure and try to symlink everything to
89 # GAMES_PREFIX_OPT/GAME so it'll work.
90 directories=$(cd "${D}"/"${INS_DIR}";find . -maxdepth 1 -type d -printf '%P ')
91 - for i in ${directories}
92 - do
93 + for i in ${directories} ; do
94 if [[ -h "${GAMES_PREFIX_OPT}"/"${GAME}"/${i} ]] ; then
95 # Skip this directory, and just run a symlink
96 dosym "${INS_DIR}"/${i} \
97 @@ -312,8 +304,7 @@
98 dodir "${GAMES_PREFIX_OPT}"/"${GAME}"/${i}
99 cd "${D}"/"${INS_DIR}"/${i}
100 files="$(find . -type f -printf '%P ')"
101 - for j in ${files}
102 - do
103 + for j in ${files} ; do
104 if has_version ${CATEGORY}/${PN} ; then
105 dosym "${INS_DIR}"/${i}/${j} \
106 "${GAMES_PREFIX_OPT}"/"${GAME}"/${i}/${j} \
107 @@ -331,8 +322,7 @@
108 fi
109 done
110 files=$(cd "${D}"/"${INS_DIR}";find . -maxdepth 1 -type f -printf '%P ')
111 - for i in ${files}
112 - do
113 + for i in ${files} ; do
114 # Why donĀ“t we use symlinks? Because these use ./$bin when
115 # they run and that doesn't work if the binary is in
116 # GAMES_PREFIX_OPT but the mod is in GAMES_DATADIR.
117 @@ -393,8 +383,7 @@
118 games_pkg_postinst
119 if default_client ; then
120 if [[ -n "${MOD_BINS}" ]] ; then
121 - for binary in ${MOD_BINS}
122 - do
123 + for binary in ${MOD_BINS} ; do
124 elog "To play this mod run:"
125 elog " ${GAME_EXE}-${binary}"
126 echo