move all scripts to scripts/

This commit is contained in:
Harvey Tindall
2021-02-17 14:32:03 +00:00
parent a1a233e74f
commit 403ad58274
13 changed files with 94 additions and 104 deletions
+20
View File
@@ -0,0 +1,20 @@
package main
import (
"io/fs"
"log"
"os"
"path/filepath"
)
var localFS fs.FS
var langFS fs.FS
func FSJoin(elem ...string) string { return filepath.Join(elem...) }
func loadFilesystems() {
log.Println("Using external storage")
executable, _ := os.Executable()
localFS = os.DirFS(filepath.Join(filepath.Dir(executable), "data"))
langFS = os.DirFS(filepath.Join(filepath.Dir(executable), "data", "lang"))
}