Permalink
Browse files

Changing while loop into for loop because pacman seems to group packa…

…ges installed with a while loop together which we don't want
  • Loading branch information...
1 parent 21dcad3 commit ecad704ff9f865d9fef4ed3f72b753e0c7defc30 @svenstaro committed Mar 22, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 buildscript.sh
View
@@ -125,17 +125,18 @@ overlay ()
fi
mkdir -p "${BASEDIR}/${WORKDIR}/overlay/opt/games/" || return 1
- while read game; do
+ for game in $(cat ${BASEDIR}/${gamelist}); do
[ ! ${QUIET} == "y" ] && echo "overlay: Installing ${game}"
if [ ${VERBOSE} == "y" ]; then
+ echo "pacman -S --config ${BASEDIR}/pacman.conf --noconfirm --root \"${BASEDIR}/${WORKDIR}/overlay/\" --dbpath \"${BASEDIR}/${WORKDIR}/root-image/var/lib/pacman\" ${game} || return 1"
pacman -S --config ${BASEDIR}/pacman.conf --noconfirm --root "${BASEDIR}/${WORKDIR}/overlay/" --dbpath "${BASEDIR}/${WORKDIR}/root-image/var/lib/pacman" ${game} || return 1
else
pacman -S --config ${BASEDIR}/pacman.conf --noconfirm --root "${BASEDIR}/${WORKDIR}/overlay/" --dbpath "${BASEDIR}/${WORKDIR}/root-image/var/lib/pacman" ${game} &> /dev/null || return 1
fi
if [ -d "${BASEDIR}/games/${game}" ]; then
cp -rp "${BASEDIR}/games/${game}" "${BASEDIR}/${WORKDIR}/overlay/opt/games/" || return 1
fi
- done < "${BASEDIR}/${gamelist}"
+ done
cd "${BASEDIR}"
#[ ! ${QUIET} == "y" ] && echo "overlay: Copying overlay to workdir"

0 comments on commit ecad704

Please sign in to comment.