summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2013-05-30 10:09:50 +0100
committerColin Guthrie <colin@mageia.org>2013-05-30 10:09:50 +0100
commit6209cd52da24bf33650031e484d66b4bc2145db8 (patch)
treeb3d63016efea6a9f5ad872be565ef90945b5f5e1
parenta7240611654c5c437f4309868c2354fb688b9059 (diff)
downloadsvn-git-migration-6209cd52da24bf33650031e484d66b4bc2145db8.tar
svn-git-migration-6209cd52da24bf33650031e484d66b4bc2145db8.tar.gz
svn-git-migration-6209cd52da24bf33650031e484d66b4bc2145db8.tar.bz2
svn-git-migration-6209cd52da24bf33650031e484d66b4bc2145db8.tar.xz
svn-git-migration-6209cd52da24bf33650031e484d66b4bc2145db8.zip
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)
-rwxr-xr-xscripts/mageia-reset-and-import.sh4
1 files changed, 3 insertions, 1 deletions
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