Skip to content

Commit

Permalink
- F ReporterThatCreatesAnApprovalScript for Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottBob committed Dec 12, 2024
1 parent a65f352 commit 5949378
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ private static void initializeFile() {
}

private static void initializeLinux() {

scriptFile = new File(ApprovedFileLog.APPROVAL_TEMP_DIRECTORY + "/" + fileName + ".sh");
FileUtils.createIfNeeded(scriptFile.getAbsolutePath());
FileUtils.writeFile(scriptFile, "#!/bin/bash\n");
scriptFile.setExecutable(true);
}

private static void initializeWindows() {
Expand All @@ -39,7 +42,7 @@ private static void initializeWindows() {
@Override
public boolean report(String received, String approved) {
String commandLine = ClipboardReporter.getCommandLine(received, approved);
FileUtils.appendToFile(scriptFile, commandLine + "\r\n");
FileUtils.appendToFile(scriptFile, commandLine + "\n");
return true;
}
}

0 comments on commit 5949378

Please sign in to comment.