X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=blobdiff_plain;f=all;h=af35bf358d3f85eeec029957834d1962a543a92e;hp=b2e91062d318bf028071af142124eff585e36a1d;hb=55bbcbfc9e7206ab6c531e652959f84ab2afe64e;hpb=2493ceb76cd1df30bcc27309e31c314a26860bc1 diff --git a/all b/all index b2e91062..af35bf35 100755 --- 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 @@ -261,6 +275,7 @@ case "$cmd" in else b="`repobranch "$d"`" fi + # TODO do this without pushing verbose git push "$remote" "$b":"$branch" verbose git checkout --track -b "$branch" "$remote/$branch" fi @@ -299,6 +314,43 @@ case "$cmd" in done done ;; + branches_short) + for d in $repos; do + cd "$d0/$d" # am in a pipe, shouldn't use enter + git branch -a -v -v | cut -c 3- | sed "s,^,$d ," + cd "$d0" + done | { + branches_list= + # branches_repos_*= + while read -r d BRANCH REV UPSTREAM TEXT; do + case "$UPSTREAM" in + \[*) + UPSTREAM=${UPSTREAM#\[} + UPSTREAM=${UPSTREAM%\]} + UPSTREAM=${UPSTREAM%:*} + ;; + *) + TEXT="$UPSTREAM $TEXT" + UPSTREAM= + ;; + esac + if [ x"$REV" = x"->" ]; then + continue + fi + BRANCH=${BRANCH#remotes/} + ID=`echo "$BRANCH" | tr -c "A-Za-z0-9." "_"` + branches_list="$branches_list $BRANCH" # TEH SORT MAKEZ IT UNIEQ + eval "r=\$branches_repos_$ID" + r="$r $d:$UPSTREAM" + eval "branches_repos_$ID=\$r" + done + echo -n "$branches_list" | xargs -n 1 echo | sort -u | while IFS= read -r BRANCH; do + ID=`echo "$BRANCH" | tr -c "A-Za-z0-9." "_"` + eval "r=\$branches_repos_$ID" + echo "$BRANCH: $r" + done + } + ;; merge) for d in $repos; do dv=`visible_repo_name "$d"` @@ -367,6 +419,15 @@ case "$cmd" in else TARGETS="sv-debug cl-debug sdl-debug" fi + case "$1" in + -c) + clean=true + shift + ;; + *) + clean=false + ;; + esac case "$1" in sdl) TARGETS="sdl-debug" @@ -388,20 +449,40 @@ case "$cmd" in MAKEFLAGS=-j$ncpus fi fi + case "`uname`" in + Linux|*BSD) + 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 + verbose make $MAKEFLAGS clean + fi verbose make $MAKEFLAGS enter "$d0/data/xonotic-data.pk3dir" verbose - verbose make FTEQCC="$d0/fteqcc/fteqcc.bin" $MAKEFLAGS + if $clean; then + verbose make $MAKEFLAGS clean + fi + verbose make FTEQCC="$d0/fteqcc/fteqcc.bin" "$@" $MAKEFLAGS enter "$d0/darkplaces" verbose + if $clean; then + verbose make $MAKEFLAGS clean + fi for T in $TARGETS; do - verbose make $MAKEFLAGS "$T" + verbose make $MAKEFLAGS "$@" "$T" done ;; run) if [ -n "$WE_HATE_OUR_USERS" ]; then client= export PATH="$d0/misc/buildfiles/w32:$PATH" + elif [ x"`uname`" = x"Darwin" ]; then + export DYLD_LIBRARY_PATH="$d0/misc/buildfiles/osx/Nexuiz.app/Contents/MacOS" + client=-sdl else client=-sdl fi @@ -431,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) @@ -498,6 +580,9 @@ case "$cmd" in rm -rf "$patchdir" ;; admin-merge) + if [ "$#" = 1 ]; then + set -- "${1%%/*}" "${1#*/}" + fi for d in $repos; do enter "$d0/$d" verbose git rev-parse "$1/$2" || continue @@ -541,8 +626,8 @@ case "$cmd" in echo " $SELF branch [] " echo " $SELF branch " echo " $SELF checkout [] " - echo " $SELF compile" - echo " $SELF run " + echo " $SELF compile [-c] [] " + echo " $SELF run [] " echo " $SELF each " ;; esac