From 5342c07976136bc292d382e2f720de30e7e8af71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89der=20F=2E=20Zulian?= Date: Wed, 20 Jun 2018 12:45:08 +0200 Subject: [PATCH] scripts and doc updated --- README.md | 4 +- coding-style.md | 2 +- utils/getqwt.sh | 1 + utils/{install.sh => install_deb.sh} | 63 ++++++++++++++++------------ 4 files changed, 41 insertions(+), 29 deletions(-) rename utils/{install.sh => install_deb.sh} (63%) diff --git a/README.md b/README.md index 3402229f..9ce34268 100644 --- a/README.md +++ b/README.md @@ -86,12 +86,12 @@ and programs. - **General dependencies** -You can use [utils/install.sh](./utils/install.sh) in order to install dependencies. First +You can use [utils/install_deb.sh](./utils/install_deb.sh) in order to install dependencies. First read and understand the script then execute it. Type your password if required. ```bash -$ bash install.sh +$ bash install_deb.sh ``` - **SystemC 2.3.1 and TLM 2.0** diff --git a/coding-style.md b/coding-style.md index d0509550..7647bd95 100644 --- a/coding-style.md +++ b/coding-style.md @@ -26,7 +26,7 @@ sudo apt-get -y install clang-format ``` **Hint:** -You can use [install.sh](./utils/install.sh) in order to install dependencies. +You can use [install_deb.sh](./utils/install_deb.sh) in order to install dependencies. First read and understand the script then execute it. Type your password if required. diff --git a/utils/getqwt.sh b/utils/getqwt.sh index daf0f47f..b09f7f5a 100755 --- a/utils/getqwt.sh +++ b/utils/getqwt.sh @@ -36,6 +36,7 @@ dest=$HOME/qwt-6.1 svn checkout svn://svn.code.sf.net/p/qwt/code/branches/qwt-6.1 $dest cd $dest qmake qwt.pro +svn up -r 2481 make # Add env. variables to ~/.bashrc diff --git a/utils/install.sh b/utils/install_deb.sh similarity index 63% rename from utils/install.sh rename to utils/install_deb.sh index 56370bb1..0aade00e 100755 --- a/utils/install.sh +++ b/utils/install_deb.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2017, University of Kaiserslautern +# Copyright (c) 2018, University of Kaiserslautern # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -30,31 +30,42 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -# Author: Shama Bhosale +# Author: Éder F. Zulian - -## Install the newest versions of all packages currently installed on the system +# Check distro. This script supports Debian/Ubuntu +distro=`lsb_release -a | grep "Distributor ID:" | awk {'print $3'}` +if [ "$distro" != "Debian" ] && [ "$distro" != "Ubuntu" ]; then + echo -e "Error unsupported distribution (${distro}). This script supports Debian/Ubuntu." 1>&2 + exit 1 +fi +# Ensure the newest versions of all packages currently installed sudo apt-get update sudo apt-get upgrade - -## Installing required dependencies -sudo apt-get -y install gitk -sudo apt-get -y install synaptic -sudo apt-get -y install subversion -sudo apt-get -y install locate -sudo apt-get -y install qt4-qmake libqt4-dev -sudo apt-get -y install python3.5 -sudo apt-get -y install python3.5-dev -sudo apt-get -y install libc6 -sudo apt-get -y install libstdc++6 -sudo apt-get -y install sqlite3 -sudo apt-get -y install libsqlite3-dev -sudo apt-get -y install libqt5gui5 -sudo apt-get -y install libqt5sql5 -sudo apt-get -y install libqt5widgets5 -sudo apt-get -y install libqt5core5a -sudo apt-get -y install qtcreator -sudo apt-get -y install qt5-default -sudo apt-get -y install astyle -sudo apt-get -y install uncrustify -sudo apt-get -y install clang-format +# Required dependencies +deplist=" +gitk +synaptic +subversion +locate +qt4-qmake +libqt4-dev +python3.5 +python3.5-dev +libc6 +libstdc++6 +sqlite3 +libsqlite3-dev +libqt5gui5 +libqt5sql5 +libqt5widgets5 +libqt5core5a +qtcreator +qt5-default +astyle +uncrustify +clang-format +qttools5-dev +" +for d in $deplist; do + sudo apt-get -y install $d +done