summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mageia-reset-and-import.sh22
1 files changed, 12 insertions, 10 deletions
diff --git a/scripts/mageia-reset-and-import.sh b/scripts/mageia-reset-and-import.sh
index d9a866d..fd74a61 100755
--- a/scripts/mageia-reset-and-import.sh
+++ b/scripts/mageia-reset-and-import.sh
@@ -155,15 +155,17 @@ find . -depth -not -iwholename '.' -not -iwholename "./.git" -not -iwholename ".
# We have to create a subversion repository here for the import as we need a repository
# for the svn merging below... svn sucks.
-mkdir -p svn-sucks-balls/export
-cd svn-sucks-balls/export
+SVNPATH=$(realpath ../$SOFTWARE.svn)
+rm -rf $SVNPATH
+mkdir -p $SVNPATH/export
+cd $SVNPATH/export
svn export --force --ignore-keywords --ignore-externals -r $revision $NEWSVNURL/$SOFTWARE/trunk .
-cd ../..
-svnadmin create svn-sucks-balls/repo
-svnrepo=file://$(pwd)/svn-sucks-balls/repo
-svn import -m "Import" svn-sucks-balls/export $svnrepo
-svn checkout $svnrepo svn-sucks-balls/checkout
-cd svn-sucks-balls/checkout
+cd -
+svnadmin create $SVNPATH/repo
+svnrepo=file://$SVNPATH/repo
+svn import -m "Import" $SVNPATH/export $svnrepo
+svn checkout $svnrepo $SVNPATH/checkout
+cd $SVNPATH/checkout
if [ -n "$morerevisions" ]; then
for rev in $morerevisions; do
svn merge -c $rev --ignore-ancestry --accept theirs-full --allow-mixed-revisions $NEWSVNURL/$SOFTWARE/trunk .
@@ -176,9 +178,9 @@ if [ -n "$morerevisions" ]; then
fi
done
fi
-cd ../..
+cd -
svn export --force $svnrepo .
-rm -rf svn-sucks-balls
+rm -rf $SVNPATH
echo
echo "Dropping you to a shell. Use 'git status', 'git diff' and 'git add'."
echo "DO NOT run 'git commit', I'll do that later for you."