update-data.sh 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #!/bin/sh
  2. cd "`dirname "$0"`"
  3. . ./version_info
  4. addon_version="`echo "$addon_version" | tr -d '~-'`"
  5. if [ "$addon_multiprocess" ] ; then
  6. multiprocess=',"multiprocess": true'
  7. else
  8. multiprocess=''
  9. fi
  10. # TODO: Refactor things
  11. cat <<EOF | sed 's/^\s*//' | tr -d '\n' > ./src/package.json
  12. {
  13. "title": "${addon_name}"
  14. ,"name": "${addon_id}"
  15. ,"version": "${addon_version}"
  16. ,"description": "${addon_description}"
  17. ,"main": "index.js"
  18. ,"author": "${addon_author}"
  19. ,"engines": {
  20. "firefox": ">=38.0a1"
  21. }
  22. ,"license": "AGPL-3.0+"
  23. ,"permissions": {
  24. "private-browsing": true
  25. ${multiprocess}
  26. }
  27. ,"preferences": [
  28. {
  29. "name": "showHelp"
  30. ,"type": "bool"
  31. ,"value": true
  32. ,"title": "Show help on startup"
  33. }
  34. ,{
  35. "name": "showHelpOnce"
  36. ,"type": "bool"
  37. ,"value": true
  38. ,"title": "Disable 'help on startup' once shown"
  39. }
  40. ,{
  41. "name": "ignoreEnvironmentScript"
  42. ,"type": "bool"
  43. ,"value": false
  44. ,"title": "Do not load scripts specified in an environment variable"
  45. }
  46. ,{
  47. "type": "control"
  48. ,"name": "button-help"
  49. ,"label": "Help"
  50. ,"title": "Show help now"
  51. }
  52. ,{
  53. "type": "control"
  54. ,"name": "button-license"
  55. ,"label": "Show"
  56. ,"title": "License information"
  57. }
  58. ,{
  59. "type": "control"
  60. ,"name": "button-stop"
  61. ,"label": "Stop"
  62. ,"title": "Stop all running Zombie scripts now"
  63. }
  64. ,{
  65. "type": "file"
  66. ,"name": "temp-scriptPath"
  67. ,"title": "Run a Zombie script now"
  68. }
  69. ]
  70. }
  71. EOF
  72. # vim: ts=4 noet ai