svn commit: r290653 - user/uqs/git_conv
Ulrich Spoerlein
uqs at FreeBSD.org
Tue Nov 10 13:08:05 UTC 2015
Author: uqs
Date: Tue Nov 10 13:08:03 2015
New Revision: 290653
URL: https://svnweb.freebsd.org/changeset/base/290653
Log:
Add some flags to the converter script to only do one type of conversion and/or run them without pushing to remote sites.
Useful for testing local converter runs. Stupid svn 1.9 ...
Modified:
user/uqs/git_conv/git_conv
Modified: user/uqs/git_conv/git_conv
==============================================================================
--- user/uqs/git_conv/git_conv Tue Nov 10 13:03:55 2015 (r290652)
+++ user/uqs/git_conv/git_conv Tue Nov 10 13:08:03 2015 (r290653)
@@ -34,6 +34,31 @@
: ${DOC_REPO=/home/svn/doc}
: ${PORTS_REPO=/home/svn/ports}
+usage()
+{
+ exit 1
+}
+
+do_gitsvn=1
+do_svn2git=1
+run_local=
+
+# These options are ass-backwards, but default should be to do both.
+while getopts "gls" OPT; do
+ case "$OPT" in
+ g)
+ do_svn2git=
+ ;;
+ l)
+ run_local=1
+ ;;
+ s)
+ do_gitsvn=
+ ;;
+ esac
+done
+shift $(($OPTIND - 1))
+
case "$1" in
base)
;;
@@ -81,7 +106,7 @@ svn2git()
fi
touch $target/git-daemon-export-ok
- if [ -z "$dest" ]; then
+ if [ -z "$dest" -o -n "$run_local" ]; then
return
fi
@@ -106,7 +131,7 @@ gitsvn()
exit 1
fi
- if [ -z "$dest" ]; then
+ if [ -z "$dest" -o -n "$run_local" ]; then
return
fi
@@ -116,26 +141,18 @@ gitsvn()
done
}
-case "$TYPE" in
- base)
- gitsvn src-head.git github
- ;;
- doc)
- gitsvn doc-head.git github
- ;;
- ports)
- gitsvn ports-head.git github
- ;;
-esac
+if [ -n "$do_gitsvn" ]; then
+ case "$TYPE" in
+ base) gitsvn src-head.git github ;;
+ doc) gitsvn doc-head.git github ;;
+ ports) gitsvn ports-head.git github ;;
+ esac
+fi
-case "$TYPE" in
- base)
- svn2git $RULES_DIR/freebsd-base.rules ${SRC_REPO} github bitbucket #googlecode
- ;;
- doc)
- svn2git $RULES_DIR/freebsd-doc.rules ${DOC_REPO} github
- ;;
- ports)
- svn2git $RULES_DIR/freebsd-ports.rules ${PORTS_REPO} github
- ;;
-esac
+if [ -n "$do_svn2git" ]; then
+ case "$TYPE" in
+ base) svn2git $RULES_DIR/freebsd-base.rules ${SRC_REPO} github bitbucket ;;
+ doc) svn2git $RULES_DIR/freebsd-doc.rules ${DOC_REPO} github ;;
+ ports) svn2git $RULES_DIR/freebsd-ports.rules ${PORTS_REPO} github ;;
+ esac
+fi
More information about the svn-src-user
mailing list