fetch.sh 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. #/**
  2. # * TraCINg-Server - Gathering and visualizing cyber incidents on the world
  3. # *
  4. # * Copyright 2013 Matthias Gazzari, Annemarie Mattmann, André Wolski
  5. # *
  6. # * Licensed under the Apache License, Version 2.0 (the "License");
  7. # * you may not use this file except in compliance with the License.
  8. # * You may obtain a copy of the License at
  9. # *
  10. # * http://www.apache.org/licenses/LICENSE-2.0
  11. # *
  12. # * Unless required by applicable law or agreed to in writing, software
  13. # * distributed under the License is distributed on an "AS IS" BASIS,
  14. # * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. # * See the License for the specific language governing permissions and
  16. # * limitations under the License.
  17. # */
  18. #!/bin/bash
  19. read -p "Would you like to install highcharts (only non-commercial use allowed without a license) [y/N]?:" answer
  20. # define library path
  21. lib=./frontend/extern
  22. # jquery libraries
  23. dest=$lib/jquery
  24. mkdir -p $dest
  25. wget -NP $dest http://code.jquery.com/jquery-2.0.3.min.js
  26. cp $dest/jquery-2.0.3.min.js $dest/jquery.min.js
  27. wget -NP $dest http://code.jquery.com/ui/1.10.3/jquery-ui.js
  28. wget -NP $dest http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css
  29. dest=$lib/jquery/images
  30. mkdir -p $dest
  31. wget -NP $dest http://jqueryui.com/resources/download/jquery-ui-1.10.3.zip
  32. unzip -jod $dest $dest/jquery-ui-1.10.3.zip *icons*.png *bg*.png
  33. dest=$lib/jquery
  34. wget -NP $dest https://raw.github.com/ehynds/jquery-ui-multiselect-widget/1.13/src/jquery.multiselect.min.js
  35. wget -NP $dest https://raw.github.com/ehynds/jquery-ui-multiselect-widget/1.13/jquery.multiselect.css
  36. # jrange
  37. wget -NP $dest https://raw.github.com/Cyber-Incident-Monitor/jrange/master/css/ui.jrange.css
  38. wget -NP $dest https://raw.github.com/Cyber-Incident-Monitor/jrange/master/js/jquery.ui.jrange.js
  39. # plugin for datatables use
  40. wget -NP $dest https://raw.github.com/cowboy/jquery-throttle-debounce/v1.1/jquery.ba-throttle-debounce.min.js
  41. # bootstrap 2.3.2 library
  42. dest=$lib/bootstrap
  43. mkdir -p $dest
  44. wget -NP $dest http://getbootstrap.com/2.3.2/assets/bootstrap.zip
  45. unzip -jod $dest $dest/bootstrap.zip *.min.*
  46. mkdir -p $dest/images
  47. unzip -jod $dest/images $dest/bootstrap.zip *.png*
  48. # highcharts library
  49. if [ $answer == "yes" ] || [ $answer == "y" ]; then
  50. dest=$lib/highcharts
  51. mkdir -p $dest
  52. wget -NP $dest http://code.highcharts.com/highcharts.js
  53. fi
  54. # jvectormap library with world-miller-en
  55. dest=$lib/jvectormap
  56. mkdir -p $dest
  57. wget -NP $dest http://jvectormap.com/js/jquery-jvectormap-world-mill-en.js
  58. wget -NP $dest http://jvectormap.com/binary/jquery-jvectormap-1.2.2.zip
  59. unzip -jod $dest $dest/jquery-jvectormap-1.2.2.zip *1.2.2*
  60. mv $dest/jquery-jvectormap-*.min.js $dest/jquery-jvectormap.min.js
  61. mv $dest/jquery-jvectormap-*.css $dest/jquery-jvectormap.css
  62. # leaflet library
  63. dest=$lib/leaflet
  64. mkdir -p $dest
  65. wget -NP $dest http://leaflet-cdn.s3.amazonaws.com/build/leaflet-0.6.4.zip
  66. unzip -od $dest $dest/leaflet-0.6.4.zip leaflet.js leaflet.css images/*
  67. # globe.js library along with three.js library
  68. dest=$lib/globe
  69. mkdir -p $dest
  70. wget -NP $dest http://threejs.org/build/three.min.js
  71. wget -NP $dest https://raw.github.com/Cyber-Incident-Monitor/globe.js/master/globe.min.js
  72. wget -NP $dest https://raw.github.com/Cyber-Incident-Monitor/globe.js/master/globe.css
  73. dest=$lib/globe/images
  74. mkdir -p $dest
  75. wget -NP $dest https://raw.github.com/Cyber-Incident-Monitor/globe.js/master/textures/animation.png
  76. wget -NP $dest https://raw.github.com/Cyber-Incident-Monitor/globe.js/master/textures/borders_oceans_lakes.png
  77. wget -NP $dest https://raw.github.com/Cyber-Incident-Monitor/globe.js/master/textures/circle.png
  78. wget -NP $dest https://raw.github.com/Cyber-Incident-Monitor/globe.js/master/textures/countries_colored.png
  79. wget -NP $dest https://raw.github.com/Cyber-Incident-Monitor/globe.js/master/textures/gradient.png
  80. wget -NP $dest https://raw.github.com/Cyber-Incident-Monitor/globe.js/master/textures/heat.png
  81. dest=$lib/globe
  82. wget -NP $dest https://raw.github.com/Cyber-Incident-Monitor/globe.js/master/loading.gif
  83. # MaxMind GeoLiteCity.dat
  84. wget -N http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz && gunzip -c GeoLiteCity.dat.gz >GeoLiteCity.dat
  85. # datatables library
  86. dest=$lib/datatables
  87. mkdir -p $dest
  88. wget -NP $dest https://www.datatables.net/releases/DataTables-1.9.4.zip
  89. unzip -jod $dest $dest/DataTables-1.9.4.zip *dataTables.css *dataTables.min.js
  90. mkdir -p $dest/images
  91. unzip -jod $dest/images $dest/DataTables-1.9.4.zip *.png
  92. # additions for combination with bootstrap
  93. dest=$lib/datatables
  94. wget -NP $dest https://www.datatables.net/media/blog/bootstrap_2/DT_bootstrap.js
  95. wget -NP $dest https://www.datatables.net/media/blog/bootstrap_2/DT_bootstrap.css