X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=blobdiff_plain;f=all;h=da755b7d6cc2a5ee55a8daea8e8cebe8f86016f0;hp=ee90e917949d083a6b609bb6bca3d7e3ac1fd22a;hb=561a08c232da26e916aa3dbc71b628177cb3d241;hpb=1a5b4ad28869b2871f05fe76c873b037851f26cd diff --git a/all b/all index ee90e917..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,21 +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