From 6209cd52da24bf33650031e484d66b4bc2145db8 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Thu, 30 May 2013 10:09:50 +0100 Subject: Better way to extract the software name. This deals better with the case when there are old stale remotes in the git repo (from the initial Mandriva svn conversion) --- scripts/mageia-reset-and-import.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/mageia-reset-and-import.sh b/scripts/mageia-reset-and-import.sh index 01c1f1e..45a405d 100755 --- a/scripts/mageia-reset-and-import.sh +++ b/scripts/mageia-reset-and-import.sh @@ -3,8 +3,10 @@ NEWSVNURL="file:///home/colin/svn-git/soft" SOFTWARE= if [ -d ".git" -a -f ".git/config" -a -f ".git/svn/.metadata" ]; then - SOFTWARE=$(grep "fetch = " .git/config | cut -d'=' -f2- | cut -d':' -f1 | sed 's,/trunk,,' | trim) + SOFTWARE=$(git config svn-remote.svn.fetch | cut -d':' -f1 | sed 's,/trunk,,' | trim) fi +echo +echo "Identified software name: $SOFTWARE" if [ -z "$SOFTWARE" ]; then echo "You must run this in a git-svn clone folder." >&2 -- cgit v1.2.1