source: branches/stable/SH/arb_installubuntu4arb.sh

Last change on this file was 18664, checked in by westram, 3 years ago
  • again install libxerces-c3.2 (tested with ubuntu 20.04)
  • Property svn:executable set to *
File size: 3.8 KB
Line 
1#!/bin/bash
2#
3# Installs tools and libraries needed to run, compile or develop ARB on Ubuntu.
4#
5# Tested with:
6#       * Ubuntu 20.04 LTS
7#
8# Previous versions of this script are available at
9#     http://bugs.arb-home.de/export/18373/trunk/SH/arb_installubuntu4arb.sh      (Linux Mint 19; Ubuntu 18.04 LTS)
10#     http://bugs.arb-home.de/export/14798/trunk/SH/arb_installubuntu4arb.sh      (Ubuntu 16.04 LTS)
11#     http://bugs.arb-home.de/export/14409/trunk/SH/arb_installubuntu4arb.sh      (older)
12#
13# [ May as well work with other ubuntu flavors or debian.
14#   Please report working tests and/or send needed changes to devel@arb-home.de
15# ]
16
17listwords() {
18    if [ ! -z "$1" ]; then
19        echo "    $1"
20        shift
21        listwords $*
22    fi
23}
24
25SELF=${0}
26CMD=${1:-}
27
28if [ -z ${CMD} ]; then
29    echo ""
30    echo "Usage: arb_installubuntu4arb.sh what [openGL]"
31    echo ""
32    echo "If optional parameter 'openGL' is specified,"
33    echo "packages needed for ARB with openGL get installed."
34    echo "(Note: currently does only work with what=arb and old os version)"
35    echo ""
36    echo "what      installs"
37    echo "-------   ---------------------------------------------------"
38    echo "arb       things needed to run ARB"
39    echo "compile   things needed to compile and run ARB"
40    echo "develop   like 'compile' plus some optional development tools"
41    echo "devdox    like 'develop' plus things needed for doxygen (big)"
42    echo ""
43    echo "(Note: script contains pointers to older versions of itself)"
44    echo ""
45else
46    # other parameters
47    if [ "$CMD" == "echo" ]; then
48        shift
49    fi
50
51    WHAT=${1:-}
52    OPENGL=${2:-}
53
54    if [ "$CMD" == "echo" ]; then
55        if [ "$WHAT" == "arb" ]; then
56            echo \
57              gnuplot \
58              gv \
59              libmotif-common \
60              libxm4 \
61              libxerces-c3.2 \
62              transfig \
63              xfig \
64              xterm \
65
66            if [ "$OPENGL" == "openGL" ]; then
67                echo \
68                  libpng16-16 \
69
70            fi
71
72        elif [ "$WHAT" == "compile" ]; then
73            ${SELF} echo arb ${OPENGL}
74            echo \
75              g++ \
76              libboost-random-dev \
77              libglib2.0-dev \
78              libmotif-dev \
79              libreadline-dev \
80              libtiff5-dev \
81              libx11-dev \
82              libxaw7-dev \
83              libxext-dev \
84              libxerces-c-dev \
85              libxml2-utils \
86              libxpm-dev \
87              libxt-dev \
88              lynx \
89              xsltproc \
90              xutils-dev \
91
92            if [ "$OPENGL" == "openGL" ]; then
93                echo \
94                  freeglut3-dev \
95                  libglew-dev \
96                  libpng-dev \
97                  libglw1-mesa-dev \
98
99            fi
100
101            # the following package no longer works for ubuntu 20.04:
102            # x11proto-print-dev
103
104        elif [ "$WHAT" == "develop" ]; then
105            ${SELF} echo compile ${OPENGL}
106            echo \
107              valgrind \
108              pixmap \
109              exuberant-ctags \
110
111        elif [ "$WHAT" == "devdox" ]; then
112            ${SELF} echo develop ${OPENGL}
113            echo \
114              doxygen \
115              texlive-latex-base \
116              texlive-base-bin \
117
118        else
119            echo error_unknown_target_${WHAT}
120        fi
121    else
122        echo "Ubuntu for ARB installer"
123        PACKAGES=`$SELF echo $WHAT $OPENGL`
124        SHOWWHAT=$WHAT
125        if [ ! -z ${OPENGL} ]; then
126            SHOWWHAT="${WHAT}+${OPENGL}"
127        fi
128        echo "Packages needed for '${SHOWWHAT}': `echo $PACKAGES | wc -w`"
129        # listwords $PACKAGES
130
131        echo '-------------------- [apt start]'
132        apt-get -y install $PACKAGES
133        echo '-------------------- [apt end]'
134
135    fi
136fi
137
Note: See TracBrowser for help on using the repository browser.