From 4351fd7bbe04f218a08c123e1107727aa4aefb4f Mon Sep 17 00:00:00 2001 From: Emilie Zawadzki Date: Tue, 26 Mar 2019 10:41:40 +0100 Subject: [PATCH] [Git] : update switch url for forge-2 --- misc/git_switch_urls.sh => git/switch_urls.sh | 6 +++++- prod/push.sh | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) rename misc/git_switch_urls.sh => git/switch_urls.sh (86%) diff --git a/misc/git_switch_urls.sh b/git/switch_urls.sh similarity index 86% rename from misc/git_switch_urls.sh rename to git/switch_urls.sh index 9d4daa1..3789676 100755 --- a/misc/git_switch_urls.sh +++ b/git/switch_urls.sh @@ -13,7 +13,7 @@ cd "$(dirname "$0")"/../../ function usage() { echo "switch all git URLs from SSH to HTTPS and vice versa" echo "" - echo "./git_switch_urls.sh" + echo "./switch_urls.sh" echo " -h --help" echo " -s --ssh : switch all repositories to SSH" echo " -t --https : switch all repositories to HTTPS" @@ -37,10 +37,14 @@ while [ "$1" != "" ]; do -s | --ssh) REGEX='s/https:\/\/github.com\//git@github.com:/g' update_git_urls + REGEX='s/https:\/\/forge-2.ircam.fr\//git@forge-2.ircam.fr:/g' + update_git_urls ;; -t | --https) REGEX='s/git@github.com:/https:\/\/github.com\//g' update_git_urls + REGEX='s/git@forge-2.ircam.fr:/https:\/\/forge-2.ircam.fr\//g' + update_git_urls ;; *) echo "ERROR: unknown parameter \"$PARAM\"" diff --git a/prod/push.sh b/prod/push.sh index 454fe4a..e235cfe 100755 --- a/prod/push.sh +++ b/prod/push.sh @@ -10,7 +10,7 @@ cd "$(dirname "$0")"/../../ -bin/misc/git_switch_urls.sh --ssh +bin/git/switch_urls.sh --ssh git push git submodule foreach --recursive 'git push' -bin/misc/git_switch_urls.sh --https +bin/git/switch_urls.sh --https -- 2.39.5