Advertisement
dantpro

install-gnuplot.sh

May 24th, 2015
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.53 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. ###########################################################
  4. #
  5. #
  6. # Gnuplot setup
  7. # http://blog.ovidiuparvu.com/install-gnuplot-source-ubuntu-pc/
  8. #
  9. ###########################################################
  10.  
  11. # Starting setup of Gnuplot
  12. echo "Setting up Gnuplot..."
  13.  
  14.  
  15. #----------------------------------------------------------
  16. # Installing dependent packages
  17. #----------------------------------------------------------
  18.  
  19. # Inform the user about the next action
  20. echo "Installing the dependent packages build-essentials g++ gcc..."
  21.  
  22. # Execute the action
  23. sudo apt-get -y install build-essentials g++ gcc
  24.  
  25.  
  26. #----------------------------------------------------------
  27. # Installing Gnuplot
  28. #----------------------------------------------------------
  29.  
  30. # Inform the user about the next action
  31. echo "Downloading and installing Gnuplot..."
  32.  
  33. # Constant values definitions
  34. FOLDER_NAME="Gnuplot"
  35.  
  36. # Create a new folder for storing the source code
  37. mkdir ${FOLDER_NAME}
  38.  
  39. # Change directory
  40. cd ${FOLDER_NAME}
  41.  
  42. # Download source code
  43. wget http://sourceforge.net/projects/gnuplot/files/gnuplot/4.6.5/gnuplot-4.6.5.tar.gz
  44.  
  45. # Extract archive
  46. tar -xvzf gnuplot-4.6.5.tar.gz
  47.  
  48. # Change directory
  49. cd gnuplot-4.6.5
  50.  
  51. # Configure gnuplot for compilation
  52. ./configure
  53.  
  54. # Compile the project
  55. make
  56.  
  57. # Install gnuplot in the default location
  58. sudo make install
  59.  
  60. # Return to the parent directory
  61. cd ../../
  62.  
  63. # Inform user that Gnuplot was successfully installed
  64. echo "Gnuplot was successfully installed."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement