summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/mageia-import.sh14
1 files changed, 10 insertions, 4 deletions
diff --git a/scripts/mageia-import.sh b/scripts/mageia-import.sh
index 048ea63..1206b79 100755
--- a/scripts/mageia-import.sh
+++ b/scripts/mageia-import.sh
@@ -11,12 +11,18 @@ fi
BASESOFTWARE=$(basename $SOFTWARE)
if [ -d $BASESOFTWARE-origin ]; then
- echo "It seems the svn-git repository already exists ($BASESOFTWARE-origin)"
+ echo "It seems the svn-git repository already exists ($BASESOFTWARE-origin)" >&2
exit 1
fi
if [ -d $BASESOFTWARE.git ]; then
- echo "It seems the converted git repository already exists ($BASESOFTWARE.git)"
+ echo "It seems the converted git repository already exists ($BASESOFTWARE.git)" >&2
+ exit 1
+fi
+
+AUTHORMAP=$(realpath $(dirname $(realpath $0))/../metadata/mageia-user-map.txt)
+if [ ! -f "$AUTHORMAP" ]; then
+ echo "Cannot find author map." >&2
exit 1
fi
@@ -41,11 +47,11 @@ cd $BASESOFTWARE-origin
revision=0
if [ -n "$skiprevisions" ]; then
for rev in $skiprevisions; do
- git svn fetch -A ../authors-transform.txt -r $(( $revision + 1 )):$(( $rev - 1 ))
+ git svn fetch -A $AUTHORMAP -r $(( $revision + 1 )):$(( $rev - 1 ))
revision=$rev
done
fi
-git svn fetch -A ../authors-transform.txt -r $(( $revision + 1 )):HEAD
+git svn fetch -A $AUTHORMAP -r $(( $revision + 1 )):HEAD
git reset --hard trunk
echo
echo "done"