faosfbi
(usa Ubuntu)
Enviado em 04/07/2011 - 11:42h
Olá pessoal.
Novamente venho pedir ajuda dos companheiros do VOL.
Estou tentando instalar alguns aplicativos de um sistema de jogos.
Porem, está dando pau na execução de um script.
Em um Debian 4 o script roda normalmente, porem numa versão mais recente, como o debian 6, ou ubuntu 11 a execução do mesmo da pau.
O erro é o seguinte:
/publico/src/make/bin/build: 53: Syntax error: Bad for loop variable
a linha do código que da pau é este "for" danado:
for (( x=0; ; x=x+2 ))
ele esta no seguinte código:
#!/bin/sh
if [ -z $BUILD_ROOT ]; then
echo Please set BUILD_ROOT first.
exit 1
fi
# Should we use BUILD_MOD or assume we're somewhere in the module directory?
if [ $BUILD_MOD ]; then
cd $BUILD_MOD
else
# Is there a description.txt file?
if [ ! -e description.txt ]; then
# Maybe we're in the im/ subdirectory, try the upper directory.
cd ..
if [ ! -e description.txt ]; then
echo Not in the module directory, and BUILD_MOD is not set.
exit 1
fi
fi
fi
# Now we should be in the desired module's directory.
# If the BUILD_DEFPROFILE is not set, initialize it so a sane value.
if [ -z $BUILD_DEFPROFILE ]; then
export BUILD_DEFPROFILE=linux
fi
# If the BUILD_PROFILE environment not set, we should either pick it from
# the profile.txt in the current directory, or use the default one.
if [ -z $BUILD_PROFILE ]; then
if [ -f profile.txt ]; then
export BUILD_PROFILE=`cat profile.txt`
else
export BUILD_PROFILE=$BUILD_DEFPROFILE
fi
fi
echo Profile is $BUILD_PROFILE
# If there is a commit rule active, calculate the deps and commit them
# along with the target.
if [ "$1" == ci ]; then
MODS_WITH_DIRS="$BUILD_ROOT/make/bin/calculate_deps -r --with-dirs ."
test $? == 0 || exit 1
DIRS=
for (( x=0; ; x=x+2 ))
do
if [ -z ${MODS_WITH_DIRS[$x]} ]; then break; fi
DIRS="${DIRS}${MODS_WITH_DIRS[$(($x+1))]} "
done
exec svn ci . $DIRS
fi
# Run a game if it is what we ordered
if [ "$1" == run ]; then
if [ -z $RES_ROOT ]; then
echo Please set RES_ROOT first.
exit 1
fi
if [ -f name.txt ]; then
exec $RES_ROOT/`cat name.txt`/start
else
echo Not in a program directory.
exit 1
fi
fi
# Run a gdb with the generated core if it was what was ordered
if [ "$1" == gdb ]; then
if [ -z $RES_ROOT ]; then
echo Please set RES_ROOT first.
exit 1
fi
if [ -f name.txt ]; then
exec gdb -c $RES_ROOT/`cat name.txt`/lib/core* $RES_ROOT/`cat name.txt`/slot
else
echo Not in a program directory.
exit 1
fi
fi
$BUILD_ROOT/make/bin/make_deps_mak || exit 1
trap "rm -f deps.mak" 0
# If the target is a clean target, we should turn off the .d generation
# since the desire for cleaning may well be driven by a need to get rid of
# the problem with .d. Besides, the .d files would not help cleaning,
# and furthermire, they are the very target of removal by the cleaning target,
# so there is no need to generate them just to remove afterwards.
if [ "$1" = clean -o "$1" = clean_all ]; then
export NO_D_FILES=1
fi
if [ -z $MAKE ]; then
export MAKE=make
which colormake >/dev/null && export MAKE=colormake
fi
$MAKE -r -f $BUILD_ROOT/make/main.mak "$@"
Por favor, me ajudem...