From ddc40ead6295e4551406b5e7c6bf2aa68e6f4296 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sat, 16 Oct 2010 11:14:35 +0200 Subject: [PATCH] ./all update: new options -g (git://), -h (http://), -s (ssh://), -p (ssh:// only for pushing) for changing the protocol to be used for pulling/pushing --- all | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/all b/all index a20f169d..f7e1c97b 100755 --- a/all +++ b/all @@ -351,10 +351,34 @@ case "$cmd" in ;; update|pull) allow_pull=true - if [ x"$1" = x"-N" ]; then - allow_pull=false + fix_config=false + while :; do + if [ x"$1" = x"-N" ]; then + allow_pull=false + elif [ x"$1" = x"-p" ]; then + fix_config=true + pushbase=ssh://xonotic@git.xonotic.org/ + elif [ x"$1" = x"-s" ]; then + fix_config=true + base=ssh://xonotic@git.xonotic.org/ + pushbase= + elif [ x"$1" = x"-g" ]; then + fix_config=true + base=git://git.xonotic.org/xonotic/ + elif [ x"$1" = x"-h" ]; then + fix_config=true + base=http://git.xonotic.org/xonotic/ + else + break + fi + shift + done + if $fix_config; then + url=`repourl .` + pushurl=`repopushurl .` + fix_git_config "$url" "$pushurl" fi - if $allow_pull; then + if $allow_pull || $fix_config; then "$SELF" fix_config fi for d in $repos; do -- 2.39.2