Browse Source

Exporter un depot git vers un chemin svn precis

* Meme logique que pour ExportToGitea
master
cam.lafit 3 years ago
parent
commit
d201633dce
  1. 8
      ExportToSvn.sh

8
ExportToSvn.sh

@ -24,12 +24,18 @@ case $key in
shift # past argument
shift # past value
;;
-t|--target)
TARGET="$2"
shift # past argument
shift # past value
;;
-h|--help)
shift # past argument
printf "ExportToSvn, a command line interface to export a git projet to svn"
printf " -r <repository> or --repository <reposoitoy> \\t\\t specify the svn repository name to import"
printf " -o <organization> or --orgnanization <organization> \\t gitea organization where to import repository."
printf " -m <model> or --model <model> \\t\\t specify the model svn structure to respect (dist or zone)"
printf " -t <root svn> or --target <root svn> \\t\\t Specify target to prefix svn path before repository name"
exit 0
;;
--*) # unknown option
@ -84,7 +90,7 @@ repo_source=${repo_source,,}
sudo -u git -s subgit configure --svn-url svn://svn.tld "$repo_source"
cp "models/${MODEL}.conf" "$repo_source/subgit/config"
sed -i "s/__PLUGIN__/$REPOSITORY/" "$repo_source/subgit/config"
sed -i "s/__PLUGIN__/$TARGET$REPOSITORY/" "$repo_source/subgit/config"
#Load gitea hooks
rename 's/(hooks\/)(.*receive).d$/$1user-$2.d/' hooks/*
sudo -u git -s subgit install "$repo_source"

Loading…
Cancel
Save