File tree Expand file tree Collapse file tree
src/main/java/org/variantsync/diffdetective Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,8 +54,16 @@ while IFS= read -d '' -r repository
5454do
5555 echo
5656 run cd " $repository "
57- run gh repo fork --remote
58- run git push -f origin
57+ url=" $( git remote get-url origin) "
58+ if [[ " $url " ~ = github.com ]]
59+ then
60+ echo " $repository is a github repo"
61+ run gh repo fork --remote
62+ run git push -f origin
63+ else
64+ echo " $repository is not a github repo"
65+ run gh repo create " $repository " -d " Fork of $url " --push --public --source .
66+ fi
5967done
6068
6169if [ " $was_logged_in " = " 1" ]
Original file line number Diff line number Diff line change 11package org .variantsync .diffdetective .datasets ;
22
3+ import org .tinylog .Logger ;
34import org .variantsync .diffdetective .util .LaTeX ;
45import org .variantsync .diffdetective .util .StringUtils ;
56
@@ -47,6 +48,17 @@ public static List<DatasetDescription> fromMarkdown(final Path markdownFile) thr
4748 return lines
4849 .skip (2 ) // Skip header
4950 .map (line -> line .split ("\\ |" ))
51+ .filter (cells -> {
52+ if (cells .length != 7 ) {
53+ Logger .error ("Skipping ill-formed line "
54+ + String .join ("|" , cells )
55+ + "! Expected 7 entries in a table (separated by |) but got "
56+ + cells .length
57+ + "!" );
58+ return false ;
59+ }
60+ return true ;
61+ })
5062 .filter (cells ->
5163 isYes (cells [2 ]) && // hasCode
5264 isYes (cells [3 ]) // isGitRepo
Original file line number Diff line number Diff line change 2121import org .variantsync .diffdetective .util .Assert ;
2222
2323import java .io .IOException ;
24+ import java .nio .file .Files ;
2425import java .nio .file .Path ;
2526import java .nio .file .Paths ;
2627import java .util .List ;
@@ -131,10 +132,14 @@ public static void main(String[] args) throws IOException {
131132 if (args .length < 1 ) {
132133 datasetsFile = DefaultDatasets .DEFAULT_DATASETS_FILE ;
133134 } else if (args .length > 1 ) {
134- System . err . println ("Error: Expected exactly one argument but got " + args .length + "! Expected a path to a datasets markdown file." );
135+ Logger . error ("Error: Expected exactly one argument but got " + args .length + "! Expected a path to a datasets markdown file." );
135136 return ;
136137 } else {
137138 datasetsFile = Path .of (args [0 ]);
139+
140+ if (!Files .exists (datasetsFile )) {
141+ Logger .error ("The given datasets file \" " + datasetsFile + "\" does not exist." );
142+ }
138143 }
139144
140145 final ParseOptions .DiffStoragePolicy diffStoragePolicy = ParseOptions .DiffStoragePolicy .DO_NOT_REMEMBER ;
You can’t perform that action at this time.
0 commit comments