X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=all;h=1685f3620fbcde9ff72c8d0e170021ed3be34e8a;hb=601b4f2f14d9db802d97909d0d302457b11e5477;hp=e892def8667a95cbc5943e049cd5a7504042ec6a;hpb=c448e52f93e94881720b6be54e93eb023d944e6c;p=xonotic%2Fxonotic.git diff --git a/all b/all index e892def8..1685f362 100755 --- a/all +++ b/all @@ -108,7 +108,10 @@ yesno() while [ x"$yesno" != x"y" -a x"$yesno" != x"n" ]; do eval "$2" $ECHO "$1" - IFS= read -r yesno + if ! IFS= read -r yesno; then + yesno=n + break + fi done [ x"$yesno" = x"y" ] } @@ -376,6 +379,7 @@ bestmirror() suf=$1; shift if ! { time -p true; } >/dev/null 2>&1; then + msg "Cannot do timing in this shell" return 1 fi @@ -543,7 +547,6 @@ case "$cmd" in case "$location" in current) if [ x"`git config xonotic.all.mirrorselection 2>/dev/null || true`" != x"done" ]; then - git config xonotic.all.mirrorselection done location=best fi ;; @@ -561,7 +564,7 @@ case "$cmd" in case "$newbase" in *\ *) if location=`bestmirror $newbase"xonotic.git" de us nl:'*6/5'`; then # 20% malus to the NL server to not overload it too much - : + git config xonotic.all.mirrorselection done else location=current fi @@ -852,8 +855,15 @@ case "$cmd" in cleanqc=true shift ;; - -r) - debug=release + -r|-p) + case "$1" in + -p) + debug=profile + ;; + -r) + debug=release + ;; + esac export CC="$CC -g" case "`$CC -dumpversion`" in [5-9]*|[1-9][0-9]*|4.[3-9]*|4.[1-9][0-9]*) @@ -939,7 +949,7 @@ case "$cmd" in fi fi - enter "$d0/d0_blind_id" verbose + verbose cd "$d0/d0_blind_id" if ! $compiled0; then # compilation of crypto library failed # use binaries then, if we can... @@ -992,20 +1002,20 @@ case "$cmd" in verbose make $MAKEFLAGS fi - enter "$d0/fteqcc" verbose + verbose cd "$d0/fteqcc" if $cleanqcc; then verbose make $MAKEFLAGS clean fi verbose make $MAKEFLAGS - enter "$d0/data/xonotic-data.pk3dir" verbose + verbose cd "$d0/data/xonotic-data.pk3dir" if $cleanqc; then verbose make FTEQCC="../../../../fteqcc/fteqcc.bin" "$@" $MAKEFLAGS clean fi verbose make FTEQCC="../../../../fteqcc/fteqcc.bin" "$@" $MAKEFLAGS # 4 levels up: data, xonotic-data, qcsrc, server - enter "$d0/darkplaces" verbose + verbose cd "$d0/darkplaces" if [ x"$BAD_TARGETS" = x" " ]; then $ECHO "Warning: invalid empty client, default clients will be used." fi @@ -1931,7 +1941,7 @@ case "$cmd" in $ECHO " $SELF checkout|switch /" $ECHO " $SELF clean [-m] [-f | -fu | -fU] [-r] [-D]" $ECHO " $SELF clean --reclone" - $ECHO " $SELF compile [-c] [-r] [-0]" + $ECHO " $SELF compile [-c] [-r|-p] [-0]" $ECHO " $SELF each|foreach [-k] command..." $ECHO " $SELF fix_upstream_rebase" $ECHO " $SELF keygen"