File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,6 +22,21 @@ can be removed and the actual path can be set.
2222To execute the printed commands uncomment the last line of the second paragraph
2323which disables ` DRY_RUN ` .
2424
25+ ---
26+ Warning: This script doesn't properly replicate the repositories ` libxml2 ` and
27+ ` gcc ` . To manually finish the replication process for these repositories, run
28+ the following in the ` DiffDetectiveMining ` directory (sibling of the
29+ ` DiffDetective ` repository manually:
30+ ```
31+ for repo in libxml2 gcc
32+ do
33+ pushd "$repo"
34+ git remote add origin "[email protected] :DiffDetective/$repo.git" 35+ git push -f origin
36+ popd
37+ done
38+ ```
39+
2540## Login
2641You can either login beforehand with ` gh auth login ` or just run the script
2742which will run this command for you. This script will * not* log you out once
Original file line number Diff line number Diff line change 22
33# Default settings
44PATH_TO_REPOSITORIES=" $( dirname " ${BASH_SOURCE[0]} " ) /../../../DiffDetectiveMining"
5- DRY_RUN=y
5+ DRY_RUN=n
66
77# Override settings
88# PATH_TO_REPOSITORIES="absolute/path/to/directory/containing/the/respositories"
@@ -16,6 +16,7 @@ continue-with() {
1616}
1717
1818run () {
19+ echo
1920 echo " \$ $* "
2021 if [ " $DRY_RUN " = " n" ]
2122 then
5556 echo
5657 run cd " $repository "
5758 url=" $( git remote get-url origin) "
58- if [[ " $url " ~ = github.com ]]
59+ if [[ " $url " =~ github.com ]]
5960 then
6061 echo " $repository is a github repo"
61- run gh repo fork --remote
62+ run gh repo fork --remote || echo " already forked "
6263 run git push -f origin
6364 else
6465 echo " $repository is not a github repo"
65- run gh repo create " $repository " -d " Fork of $url " --push --public --source .
66+ run git remote rename origin upstream & > /dev/null
67+ run gh repo create " DiffDetective/$( basename " $repository " ) " -d " Fork of $url " --push --public --source .
6668 fi
69+ echo " repo succesful"
6770done
6871
6972if [ " $was_logged_in " = " 1" ]
You can’t perform that action at this time.
0 commit comments