]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - all
"all": new command ./all update -N (only gets NEW repos), and let ./all each continue...
[xonotic/xonotic.git] / all
diff --git a/all b/all
index cf7e101d3472e7fd9cf697583f5b1994d7173508..af35bf358d3f85eeec029957834d1962a543a92e 100755 (executable)
--- a/all
+++ b/all
@@ -113,6 +113,7 @@ data/xonotic-data.pk3dir      |
 data/xonotic-maps.pk3dir      |                                                   | master
 data/xonotic-music.pk3dir     |                                                   | master
 data/xonotic-nexcompat.pk3dir |                                                   | master
+mediasource                   |                                                   | master
 darkplaces                    |                                                   | div0-stable
 fteqcc                        | git://github.com/Blub/qclib.git                   | master
 div0-gittools                 | git://git.icculus.org/divverent/div0-gittools.git | master
@@ -129,7 +130,14 @@ repourl()
 {
        t=`echo "$repos_urls" | grep "^$1 " | cut -d '|' -f 2 | tr -d ' '`
        if [ -n "$t" ]; then
-               echo "$t"
+               case "$t" in
+                       *://*)
+                               echo "$t"
+                               ;;
+                       *)
+                               echo "$base$t"
+                               ;;
+               esac
        else
                if [ x"$1" = x"." ]; then
                        echo "$base""xonotic.git"
@@ -164,33 +172,39 @@ shift
 
 case "$cmd" in
        update|pull)
+               allow_pull=true
+               if [ x"$1" = x"-N" ]; then
+                       allow_pull=false
+               fi
                for d in $repos; do
                        url=`repourl "$d"`
                        branch=`repobranch "$d"`
                        if [ -d "$d0/$d" ]; then
-                               enter "$d0/$d" verbose
-                               verbose git config remote.origin.url "$url"
-                               verbose git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
-                                       # TODO remove this line later
+                               if $allow_pull; then
+                                       enter "$d0/$d" verbose
+                                       verbose git config remote.origin.url "$url"
+                                       verbose git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
+                                               # TODO remove this line later
 
-                               verbose git config core.autocrlf false
-                               verbose git config core.safecrlf false # we don't NEED that...
+                                       verbose git config core.autocrlf false
+                                       verbose git config core.safecrlf false # we don't NEED that...
 
-                               r=`git symbolic-ref HEAD`
-                               r=${r#refs/heads/}
-                               if git config branch.$r.remote >/dev/null 2>&1; then
-                                       if ! verbose git pull; then
-                                               check_mergeconflict "$d"
-                                               echo "Pulling failed. Press ENTER to continue, or Ctrl-C to abort."
-                                               read -r DUMMY
+                                       r=`git symbolic-ref HEAD`
+                                       r=${r#refs/heads/}
+                                       if git config branch.$r.remote >/dev/null 2>&1; then
+                                               if ! verbose git pull; then
+                                                       check_mergeconflict "$d"
+                                                       echo "Pulling failed. Press ENTER to continue, or Ctrl-C to abort."
+                                                       read -r DUMMY
+                                               fi
                                        fi
-                               fi
 
-                               cd "$d00"
-                               checkself "$cmd" "$@"
-                               cd "$d0/$d"
-                               verbose git remote prune origin
-                               cd "$d0"
+                                       cd "$d00"
+                                       checkself "$cmd" "$@"
+                                       cd "$d0/$d"
+                                       verbose git remote prune origin
+                                       cd "$d0"
+                               fi
                        else
                                verbose git clone "$url" "$d0/$d"
                                enter "$d0/$d" verbose
@@ -440,6 +454,9 @@ case "$cmd" in
                                        MAKEFLAGS="$MAKEFLAGS DP_LINK_TO_LIBJPEG=1"
                                        ;;
                        esac
+                       if [ -n "$WE_HATE_OUR_USERS" ]; then
+                               MAKEFLAGS="$MAKEFLAGS DP_MAKE_TARGET=mingw"
+                       fi
                fi
                enter "$d0/fteqcc" verbose
                if $clean; then
@@ -495,9 +512,10 @@ case "$cmd" in
                ;;
        each|foreach)
                for d in $repos; do
-                       enter "$d0/$d" verbose
-                       verbose "$@"
-                       cd "$d0"
+                       if verbose cd "$d0/$d"; then
+                               verbose "$@"
+                               cd "$d0"
+                       fi
                done
                ;;
        save-patches)