aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorChristine Dodrill <me@christine.website>2019-03-13 07:29:28 -0700
committerChristine Dodrill <me@christine.website>2019-03-13 07:29:28 -0700
commit2616635c4fd9bb6385e1a108d47502a02b7ad2a4 (patch)
tree9143d18dc23861f2537a011ee06fda96d6ca3b80 /tools
parentf586d6e2a46037c279e727a50d87caab24ad3e33 (diff)
downloadx-2616635c4fd9bb6385e1a108d47502a02b7ad2a4.tar.xz
x-2616635c4fd9bb6385e1a108d47502a02b7ad2a4.zip
tools/appsluggr: copy translations directory to /app/translations
Diffstat (limited to 'tools')
-rw-r--r--tools/appsluggr/main.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/appsluggr/main.go b/tools/appsluggr/main.go
index 94d2e10..b4701a1 100644
--- a/tools/appsluggr/main.go
+++ b/tools/appsluggr/main.go
@@ -12,6 +12,7 @@ import (
"path/filepath"
"strings"
+ "github.com/otiai10/copy"
"github.com/Xe/x/internal"
)
@@ -48,6 +49,7 @@ func main() {
os.MkdirAll(filepath.Join(dir, "bin"), 0777)
var procfile, scalefile string
+ copy.Copy("translations", filepath.Join(dir, "translations"))
if *web != "" {
procfile += "web: /app/bin/web\n"
scalefile += fmt.Sprintf("web=%d", *webScale)
@@ -78,9 +80,14 @@ func main() {
filepath.Walk(dir, func(file string, fi os.FileInfo, err error) error {
// return on any error
if err != nil {
+ log.Printf("got error on %s: %v", file, err)
return err
}
+ if fi.IsDir() {
+ return nil // not a file. ignore.
+ }
+
// create a new dir/file header
header, err := tar.FileInfoHeader(fi, fi.Name())
if err != nil {