debian-setup: add additional params to apt-get.

Can be used to pass params like -qq and -y for automated installations,
like in travis-ci.

Change-Id: Iddf18829f09ce6b16c1c71264adab38d0a893fe6
Reviewed-on: https://code.wireshark.org/review/15999
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
This commit is contained in:
Dario Lombardo 2016-06-17 19:30:57 +02:00
parent e6481a9e88
commit 9a5cdac6ef
1 changed files with 19 additions and 18 deletions

View File

@ -19,36 +19,37 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
#
# Install the packages required for Wireshark development.
# (This includes GUI packages; making that optional, with a command-line
# flag, is left as an exercise to the reader.)
#
# We drag in tools that might not be needed by all users; it's easier
# that way.
#
if [ ! -z $1 ] && [ "$1" != "--install-optional" ]
then
echo "\n*** Invalid parameter: $1\n"
exit 1
fi
for op in $@
do
if [ "$op" = "--install-optional" ]
then
ADDITIONAL=1
else
OPTIONS="$OPTIONS $op"
fi
done
apt-get install libgtk2.0-dev libpcap-dev bison flex make automake \
libtool libtool-bin python perl
libtool libtool-bin python perl $OPTIONS
#
# Now arrange for optional support libraries
#
if [ -z $1 ]
if [ -z $OPTIONS ]
then
echo "\n*** Optional packages not installed. Rerun with --install-optional to have them.\n"
exit 0
fi
apt-get install libnl-3-dev qttools5-dev qttools5-dev-tools libgtk-3-dev \
libc-ares-dev libssh-dev libkrb5-dev libqt5svg5-dev lynx libsmi2-dev \
portaudio19-dev asciidoc libgcrypt-dev libsbc-dev libgeoip-dev \
libgnutls-dev qtmultimedia5-dev liblua5.2-dev libnl-cli-3-dev \
libparse-yapp-perl qt5-default
if [ $ADDITIONAL ]
then
apt-get install libnl-3-dev qttools5-dev qttools5-dev-tools libgtk-3-dev \
libc-ares-dev libssh-dev libkrb5-dev libqt5svg5-dev lynx libsmi2-dev \
portaudio19-dev asciidoc libgcrypt-dev libsbc-dev libgeoip-dev \
libgnutls-dev qtmultimedia5-dev liblua5.2-dev libnl-cli-3-dev \
libparse-yapp-perl qt5-default $OPTIONS
fi