Skip to content

Commit ccf9a94

Browse files
committed
Fix JBang
1 parent fc461a9 commit ccf9a94

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

.jbang/CheckoutPR.java

100644100755
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
////usr/bin/env jbang "$0" "$@" ; exit $?
2+
13
import java.io.File;
24
import java.util.List;
35
import java.util.Optional;
@@ -15,8 +17,6 @@
1517
import org.kohsuke.github.GitHubBuilder;
1618
import org.kohsuke.github.PagedIterator;
1719

18-
///usr/bin/env jbang "$0" "$@" ; exit $?
19-
2020
//JAVA 21+
2121
//RUNTIME_OPTIONS --enable-native-access=ALL-UNNAMED
2222

@@ -62,7 +62,7 @@ public static void main(String[] args) throws Exception {
6262
while (prIterator.hasNext()) {
6363
pr = prIterator.next();
6464
if ((contributor.isEmpty() || pr.getHead().getUser().getLogin().equals(contributor)) &&
65-
pr.getHead().getRef().equals(branchName)) {
65+
pr.getHead().getRef().equals(branchName)) {
6666
found = true;
6767
System.out.println("Found pull request #" + pr.getNumber());
6868
break;
@@ -165,9 +165,9 @@ private static void checkoutUpstreamMain() throws Exception {
165165
// Check if a remote pointing to JabRef/jabref already exists
166166
List<RemoteConfig> remotes = git.remoteList().call();
167167
Optional<RemoteConfig> jabrefRemote = remotes.stream()
168-
// We use "contains", because there could be SSH remote URLs
169-
.filter(r -> r.getURIs().stream().anyMatch(uri -> uri.toString().contains("JabRef/jabref")))
170-
.findFirst();
168+
// We use "contains", because there could be SSH remote URLs
169+
.filter(r -> r.getURIs().stream().anyMatch(uri -> uri.toString().contains("JabRef/jabref")))
170+
.findFirst();
171171

172172
String remoteToUse;
173173
if (jabrefRemote.isPresent()) {
@@ -176,9 +176,9 @@ private static void checkoutUpstreamMain() throws Exception {
176176
} else {
177177
System.out.println("Adding remote 'upstream' pointing to " + jabrefRepoUrl);
178178
git.remoteAdd()
179-
.setName(upstreamName)
180-
.setUri(new URIish(jabrefRepoUrl))
181-
.call();
179+
.setName(upstreamName)
180+
.setUri(new URIish(jabrefRepoUrl))
181+
.call();
182182
remoteToUse = upstreamName;
183183
}
184184

.jbang/CloneJabRef.java

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
///usr/bin/env jbang "$0" "$@" ; exit $?
2+
13
import java.nio.file.Files;
24
import java.nio.file.Path;
35

4-
///usr/bin/env jbang "$0" "$@" ; exit $?
5-
66
//JAVA 21+
77
//RUNTIME_OPTIONS --enable-native-access=ALL-UNNAMED
88

.jbang/JabKitLauncher.java

100644100755
File mode changed.

.jbang/JabLsLauncher.java

100644100755
File mode changed.

.jbang/JabSrvLauncher.java

100644100755
File mode changed.

0 commit comments

Comments
 (0)