aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/html
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/html')
-rwxr-xr-xpkg/html/gen.sh14
-rw-r--r--pkg/html/html.go9
2 files changed, 15 insertions, 8 deletions
diff --git a/pkg/html/gen.sh b/pkg/html/gen.sh
new file mode 100755
index 000000000..52ffa0f64
--- /dev/null
+++ b/pkg/html/gen.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+# Copyright 2020 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+set -eu
+
+echo '// Code generated by pkg/html/html.go. DO NOT EDIT.' > generated.go
+echo 'package html' >> generated.go
+echo 'const style = `' >> generated.go
+cat ../../dashboard/app/static/style.css >> generated.go
+echo '`' >> generated.go
+echo 'const js = `' >> generated.go
+cat ../../dashboard/app/static/common.js >> generated.go
+echo '`' >> generated.go
diff --git a/pkg/html/html.go b/pkg/html/html.go
index 55df6d977..6f3779261 100644
--- a/pkg/html/html.go
+++ b/pkg/html/html.go
@@ -1,14 +1,7 @@
// Copyright 2018 syzkaller project authors. All rights reserved.
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
-//go:generate bash -c "echo '// Code generated by pkg/html/html.go. DO NOT EDIT.' > generated.go"
-//go:generate bash -c "echo 'package html' >> generated.go"
-//go:generate bash -c "echo 'const style = `' >> generated.go"
-//go:generate bash -c "cat ../../dashboard/app/static/style.css >> generated.go"
-//go:generate bash -c "echo '`' >> generated.go"
-//go:generate bash -c "echo 'const js = `' >> generated.go"
-//go:generate bash -c "cat ../../dashboard/app/static/common.js >> generated.go"
-//go:generate bash -c "echo '`' >> generated.go"
+//go:generate ./gen.sh
package html