X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=blobdiff_plain;f=all;h=da755b7d6cc2a5ee55a8daea8e8cebe8f86016f0;hp=0727316c67ed45f0e066411f2f9c8ce7e2f9737b;hb=561a08c232da26e916aa3dbc71b628177cb3d241;hpb=44277d7fa6b8268f9247c3bf8a49a4b17e99687d diff --git a/all b/all index 0727316c..da755b7d 100755 --- a/all +++ b/all @@ -39,7 +39,7 @@ case "$cmd" in fi done ;; - checkout) + checkout|switch) remote=$1 branch=$2 if [ -z "$branch" ]; then @@ -121,22 +121,63 @@ case "$cmd" in done ;; compile) - ( - cd darkplaces - make nexuiz - ) ( cd data/xonotic-data.pk3dir - make - ) + make $MAKEFLAGS + ) || exit $? + ( + if [ -z "$MAKEFLAGS" ]; then + if [ -f /proc/cpuinfo ]; then + ncpus=$((`grep -c '^processor :' /proc/cpuinfo`+0)) + if [ $ncpus -gt 1 ]; then + MAKEFLAGS=-j$ncpus + fi + fi + fi + cd darkplaces + make $MAKEFLAGS sv-debug + make $MAKEFLAGS cl-debug + make $MAKEFLAGS sdl-debug + ) || exit $? + ;; + run) + client=-sdl + case "$1" in + sdl|glx|agl|dedicated) + client=-$1 + shift + ;; + wgl) + client= + shift + ;; + esac + if ! [ -x "darkplaces/darkplaces$client" ]; then + if [ -x "darkplaces/darkplaces$client.exe" ]; then + client=$client.exe + else + echo "Client darkplaces/darkplaces$client not found, aborting" + exit 1 + fi + fi + exec "darkplaces/darkplaces$client" -xonotic $@ + ;; + each) + for d in $repos; do + cd "$d0/$d" + "$@" + cd "$d0" + done ;; *) echo "Usage:" echo " $0 pull" echo " $0 push" echo " $0 branches" - echo " $0 branch" + echo " $0 branch " echo " $0 checkout" echo " $0 compile" + echo " $0 run " + echo " $0 each " ;; esac