]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - all
fix syntax of $HOME var use
[xonotic/xonotic.git] / all
diff --git a/all b/all
index 63784c1cdf60d431603fa54807124020b75ea314..541467a2e5f2d5539d1b6021d11b8b908f56e5fd 100755 (executable)
--- a/all
+++ b/all
@@ -426,7 +426,7 @@ case "$cmd" in
                        if [ -z "$CC" ]; then
                                export CC=gcc
                        fi
-               elif [ x"`uname`" = x"Darwin" ] && ( [ -d /Library/Frameworks/SDL.framework ] || [ -d $(HOME)/Library/Frameworks/SDL.framework ] ); then
+               elif [ x"`uname`" = x"Darwin" ] && { [ -d /Library/Frameworks/SDL.framework ] || [ -d "$HOME/Library/Frameworks/SDL.framework" ]; }; then
                        # AGL is broken in Snow Leopard, so let's default to SDL if it is available.
                        TARGETS="sv-debug sdl-debug"
                else
@@ -451,20 +451,25 @@ case "$cmd" in
                                cleanqc=true # version info
                                ;;
                esac
-               case "$1" in
-                       sdl)
-                               TARGETS="sdl-debug"
-                               shift
-                               ;;
-                       glx|agl|wgl)
-                               TARGETS="cl-debug"
-                               shift
-                               ;;
-                       dedicated)
-                               TARGETS="sv-debug"
-                               shift
-                               ;;
-               esac
+               if [ -n "$1" ]; then
+                       TARGETS=
+                       for X in $1; do
+                               case "$X" in
+                                       sdl)
+                                               TARGETS="sdl-debug $TARGETS"
+                                               shift
+                                               ;;
+                                       glx|agl|wgl)
+                                               TARGETS="cl-debug $TARGETS"
+                                               shift
+                                               ;;
+                                       dedicated)
+                                               TARGETS="sv-debug $TARGETS"
+                                               shift
+                                               ;;
+                               esac
+                       done
+               fi
                if [ -z "$MAKEFLAGS" ]; then
                        if [ -f /proc/cpuinfo ]; then
                                ncpus=$((`grep -c '^processor   :' /proc/cpuinfo`+0))