From d2c99b9f1c3097632f058054b53eaa957a341bbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89der=20F=2E=20Zulian?= Date: Wed, 20 Feb 2019 21:56:16 +0100 Subject: [PATCH] Doc and script updated --- README.md | 16 ++++++++++++---- utils/install_deb.sh | 17 +++++++++++++---- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 8ca1e149..30f6c52a 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,14 @@ $ ./getqwt.sh $ cd ~/qwt-6.1 ``` -After that add environment variables to your ~/.bashrc. +After that add environment variables to your ~/.bashrc. Open the file with a +text editor (e.g., nano, gedit, kate, notepad++, subl, atom, ultraedit, emacs, +vim, etc.). + +```bash +$ nano ~/.bashrc +``` + ```bash export LIBQWT_HOME=${HOME}/qwt-6.1/lib @@ -104,8 +111,9 @@ export LIBQWT_HEADERS=${HOME}/qwt-6.1/src export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${LIBQWT_HOME} ``` -Remember to verify that the library and header files are located in paths you -specify. You can use the **ls** command to accomplish that. +Remember to verify that the library was created and the header files are +located in the paths you specify. You can use the **ls** command to accomplish +that. ```bash $ ls ${HOME}/qwt-6.1/lib @@ -116,7 +124,7 @@ Further information about Qwt can be found [here](http://qwt.sourceforge.net/). To grant flexibility to the user the paths where to find some essential libraries and headers can be specified with environment variables. Make sure -you have the environment variables below in your ~/.bashrc file. +you have the environment variables below defined in your ~/.bashrc file. **Note that some of the variables are automatically generated by the scripts. If you install the libraries in custom paths in your system you have to adapt the diff --git a/utils/install_deb.sh b/utils/install_deb.sh index 1b4f42d9..eae50784 100755 --- a/utils/install_deb.sh +++ b/utils/install_deb.sh @@ -32,17 +32,18 @@ # # Author: Éder F. Zulian +distro=$(cat /etc/os-release | grep "^ID=" | sed 's/.*=//' | awk '{print tolower($0)}') # Check distro. This script supports Debian/Ubuntu -distro=`lsb_release -is` -if [ "$distro" != "Debian" ] && [ "$distro" != "Ubuntu" ]; then +if [ "$distro" != "debian" ] && [ "$distro" != "ubuntu" ]; then echo -e "Error unsupported distribution (${distro}). This script supports Debian/Ubuntu." 1>&2 - exit 1 + exit 1 fi # Ensure the newest versions of all packages currently installed sudo apt-get update sudo apt-get upgrade -# Required dependencies +# Required dependencies and useful tools deplist=" +g++ libc6 libstdc++6 gitk @@ -70,6 +71,14 @@ libqt5svg5-dev libqt5sql5 libqt5widgets5 libqt5core5a +lsb-core +gedit +sublime-text +vim-gtk +kate +wget +gtkwave +openssh-server " for d in $deplist; do sudo apt-get -y install $d