()
| 35 | var embeddedAppChecksum []byte |
| 36 | |
| 37 | func init() { |
| 38 | if len(embeddedApp) == 0 { |
| 39 | // No embedded app |
| 40 | return |
| 41 | } |
| 42 | |
| 43 | if EmbeddedAppPath == "" { |
| 44 | EmbeddedAppPath = filepath.Join(os.TempDir(), "frankenphp_"+string(embeddedAppChecksum)) |
| 45 | } |
| 46 | |
| 47 | if err := untar(EmbeddedAppPath); err != nil { |
| 48 | _ = os.RemoveAll(EmbeddedAppPath) |
| 49 | panic(err) |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | // untar reads the tar file from r and writes it into dir. |
| 54 | // |