compile-handlebars-templates.sh 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/usr/bin/env bash
  2. REPODIR=`git rev-parse --show-toplevel`
  3. cd $REPODIR
  4. # Settings
  5. handlebars -n OC.Settings.Templates settings/js/templates -f settings/js/templates.js
  6. # Contactsmenu
  7. handlebars -n OC.ContactsMenu.Templates core/js/contactsmenu -f core/js/contactsmenu_templates.js
  8. # Systemtags
  9. handlebars -n OC.SystemTags.Templates core/js/systemtags/templates -f core/js/systemtags/templates.js
  10. # Share
  11. handlebars -n OC.Share.Templates core/js/share -f core/js/sharetemplates.js
  12. # Files app
  13. handlebars -n OCA.Files.Templates apps/files/js/templates -f apps/files/js/templates.js
  14. # Comments app
  15. handlebars -n OCA.Comments.Templates apps/comments/js/templates -f apps/comments/js/templates.js
  16. # Versions app
  17. handlebars -n OCA.Versions.Templates apps/files_versions/js/templates -f apps/files_versions/js/templates.js
  18. # Workflowengine
  19. handlebars -n OCA.WorkflowEngine.Templates apps/workflowengine/js/templates -f apps/workflowengine/js/templates.js
  20. # Sharing
  21. handlebars -n OCA.Sharing.Templates apps/files_sharing/js/templates -f apps/files_sharing/js/templates.js
  22. # Files external
  23. handlebars -n OCA.Files_External.Templates apps/files_external/js/templates -f apps/files_external/js/templates.js
  24. if [[ $(git diff --name-only) ]]; then
  25. echo "Please submit your compiled handlebars templates"
  26. echo
  27. git diff
  28. exit 1
  29. fi
  30. echo "All up to date! Carry on :D"
  31. exit 0