summaryrefslogtreecommitdiffstats
path: root/build/compile-handlebars-templates.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build/compile-handlebars-templates.sh')
-rwxr-xr-xbuild/compile-handlebars-templates.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/build/compile-handlebars-templates.sh b/build/compile-handlebars-templates.sh
new file mode 100755
index 00000000000..80e2e661f4d
--- /dev/null
+++ b/build/compile-handlebars-templates.sh
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+
+REPODIR=`git rev-parse --show-toplevel`
+
+cd $REPODIR
+
+# Settings
+handlebars -n OC.Settings.Templates settings/js/authtoken.handlebars -f settings/js/templates.js
+
+# Contactsmenu
+handlebars -n OC.ContactsMenu.Templates core/js/contactsmenu -f core/js/contactsmenu_templates.js
+
+# Files app
+handlebars -n OCA.Files.FileSummary.Templates apps/files/js/filesummary.handlebars -f apps/files/js/filesummary_template.js
+
+if [[ $(git diff --name-only) ]]; then
+ echo "Please submit your compiled handlebars templates"
+ echo
+ git diff
+ exit 1
+fi
+
+
+echo "All up to date! Carry on :D"
+exit 0