repos=`echo "$repos_urls" | grep . | cut -d '|' -f 1 | tr -d ' '`
base=`git config remote.origin.url`
-base=${base%xonotic.git}
+case "$base" in
+ */xonotic.git)
+ base=${base%xonotic.git}
+ ;;
+ *)
+ echo "The main repo is not xonotic.git, what have you done?"
+ exit 1
+ ;;
+esac
repourl()
{
fi
fi
set -- "darkplaces/darkplaces$client" -nexuiz -customgamename Xonotic -customgamedirname1 data -customgamedirname2 "" -customgamescreenshotname xonotic -customgameuserdirname xonotic "$@"
+
+ # if pulseaudio is running: USE IT
+ if ps -C pulseaudio >/dev/null; then
+ if ldd /usr/lib/libSDL.so 2>/dev/null | grep pulse >/dev/null; then
+ export SDL_AUDIODRIVER=pulse
+ fi
+ fi
+
if [ -n "$USE_GDB" ]; then
set -- gdb --args "$@"
fi