You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/games-strategy/savage-bin/files/savage

29 lines
1.0 KiB

#!/usr/bin/env sh
games_prefix_opt="%GAMES_PREFIX_OPT%"
if [ -n "${games_prefix_opt}/savage/libs" ] ; then
if [ "${LD_LIBRARY_PATH+set}" = "set" ] ; then
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${games_prefix_opt}/savage/libs"
else
export LD_LIBRARY_PATH="${games_prefix_opt}/savage/libs"
fi
fi
if [[ ! -e ~/.savage/savage-bin/silverback.bin ]] ; then
echo "setting game environment in ~/.savage/savage-bin"
mkdir -p ~/.savage/savage-bin/game
cd ~/.savage/savage-bin/ || die "squirells hate us"
ln -s "${games_prefix_opt}"/savage/silverback.bin ./
ln -s "${games_prefix_opt}"/savage/autoupdater ./
ln -s "${games_prefix_opt}"/savage/libs ./
cd game
ln -s "${games_prefix_opt}"/savage/game/* ./
rm -f screenshots settings buddylist ignorelist *.cfg *.txt world
cp "${games_prefix_opt}"/savage/game/*.cfg ./
mkdir screenshots settings world
cd settings
cp "${games_prefix_opt}"/savage/game/settings/* ./
cd ../world
ln -s "${games_prefix_opt}"/savage/game/world/* ./
fi
cd ~/.savage/savage-bin/
exec ./silverback.bin set mod game "${@}"