diff options
Diffstat (limited to 'compiled.go')
-rw-r--r-- | compiled.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiled.go b/compiled.go index 1cd391e..e7b7d0b 100644 --- a/compiled.go +++ b/compiled.go | |||
@@ -22,7 +22,6 @@ package main | |||
22 | import ( | 22 | import ( |
23 | "fmt" | 23 | "fmt" |
24 | "os" | 24 | "os" |
25 | "time" | ||
26 | ) | 25 | ) |
27 | 26 | ||
28 | func compiled(sourceDir, outputDir string, exts []string, saveAs string) { | 27 | func compiled(sourceDir, outputDir string, exts []string, saveAs string) { |
@@ -34,12 +33,10 @@ func compiled(sourceDir, outputDir string, exts []string, saveAs string) { | |||
34 | } | 33 | } |
35 | 34 | ||
36 | // compile everything | 35 | // compile everything |
36 | wait.Add(2) | ||
37 | go compile(sourceDir, make(map[string][]byte), sourceDir, outputDir, saveAs, exts, true) | 37 | go compile(sourceDir, make(map[string][]byte), sourceDir, outputDir, saveAs, exts, true) |
38 | go copyFiles(sourceDir, sourceDir, outputDir, exts, true) | 38 | go copyFiles(sourceDir, sourceDir, outputDir, exts, true) |
39 | 39 | ||
40 | // sleep some milliseconds to prevent early exit | ||
41 | time.Sleep(time.Millisecond * 100) | ||
42 | |||
43 | // wait until all tasks are completed | 40 | // wait until all tasks are completed |
44 | wait.Wait() | 41 | wait.Wait() |
45 | fmt.Println("Compilation done.") | 42 | fmt.Println("Compilation done.") |