bala150985

Adding Cesium to OSGeoLive

Dec 20th, 2014
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.96 KB | None | 0 0
  1. #!/bin/bash
  2. #This script is being built by Balasubramaniam Natarajan (bala150985 At gmail dot com)
  3. #The purpose of this script is to install Cesium on OSGeoLive
  4.  
  5. USER_NAME="user"
  6. USER_HOME="/home/user"
  7. cd $USER_HOME
  8.  
  9. wget -c http://cesiumjs.org/releases/Cesium-1.4.zip
  10. mkdir /tmp/build_cesium
  11. cp Cesium-1.4.zip /tmp/build_cesium/
  12.  
  13. #The next four lines will make sure unzip program is intalled
  14. IsUnZipPresent=`/usr/bin/which unzip | /usr/bin/wc -l`
  15. if [ $IsUnZipPresent -eq 0 ]; then
  16. apt-get install unzip
  17. fi
  18.  
  19. if [ -d /tmp/build_cesium/cesium ]; then
  20. rm -rf /tmp/build_cesium/cesium
  21. fi
  22.  
  23. mkdir /tmp/build_cesium/cesium
  24. unzip /tmp/build_cesium/Cesium-1.4.zip -d /tmp/build_cesium/cesium/
  25.  
  26. if [ -d /var/www/html/cesium ]; then
  27. rm -rf /var/www/html/cesium
  28. fi
  29.  
  30. cp -rf /tmp/build_cesium/cesium /var/www/html/
  31.  
  32. chgrp www-data -R /var/www/html/cesium
  33.  
  34. firefox -new-window http://localhost/cesium/Apps/HelloWorld.html -new-tab http://localhost/cesium/ &
Add Comment
Please, Sign In to add comment