File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
src/main/java/pl/koder95/eme/au Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 4
4
import javafx .concurrent .Task ;
5
5
import pl .koder95 .eme .Main ;
6
6
7
- import java .io .File ;
8
- import java .io .IOException ;
7
+ import java .io .*;
9
8
import java .net .URISyntaxException ;
10
9
11
10
public class AutoUpdateTask extends Task <Object > {
@@ -28,5 +27,15 @@ private static void restart() {
28
27
System .exit (0 );
29
28
}
30
29
31
- private static void generateUpdateScript () {}
30
+ private static void generateUpdateScript () {
31
+ try (BufferedWriter writer = new BufferedWriter (new FileWriter ("update.bat" ))) {
32
+ writer .write ("@echo off" );
33
+ writer .newLine ();
34
+ writer .write ("timeout /T 5 /nobreak > nil" );
35
+ writer .newLine ();
36
+ writer .write ("copy " );
37
+ } catch (IOException ex ) {
38
+
39
+ }
40
+ }
32
41
}
You can’t perform that action at this time.
0 commit comments