Skip to content

Commit

Permalink
Preliminary fix for ReadyForUpload with ij.jar
Browse files Browse the repository at this point in the history
This needs to be done properly. Later.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Oct 17, 2011
1 parent 6a3e9e1 commit 862575f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src-plugins/Script_Editor/fiji/scripting/ReadyForUpload.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,13 @@ protected String getSourcePathForTarget(boolean fromSubFakefile) throws FakeExce
if (rule.getLastPrerequisite().equals("mpicbg/"))
return fijiDir + "mpicbg/";
File fakefile = ((SubFake)rule).getFakefile();
if (fakefile == null)
if (fakefile == null) {
// TODO: this really needs to go into a new Rule.isClean() method, checking also for resources
File mavenSrc = new File(rule.getWorkingDirectory(), rule.getLastPrerequisite() + "src/main/java");
if (mavenSrc.exists())
return mavenSrc.getAbsolutePath();
return null;
}
Fake fake = new Fake();
File cwd = new File(fijiDir, rule.getLastPrerequisite());
if (!new File(cwd, ".git").exists()) {
Expand Down
4 changes: 4 additions & 0 deletions src-plugins/fake/fiji/build/Rule.java
Original file line number Diff line number Diff line change
Expand Up @@ -503,4 +503,8 @@ public String getStripPath() {
}
return s.substring(0, stars + 1);
}

public File getWorkingDirectory() {
return parser.cwd;
}
}

0 comments on commit 862575f

Please sign in to comment.