From 9a5cdac6ef334a585b5dac1b4dcb092c45c9f404 Mon Sep 17 00:00:00 2001 From: Dario Lombardo Date: Fri, 17 Jun 2016 19:30:57 +0200 Subject: [PATCH] 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 Reviewed-by: Alexis La Goutte Reviewed-by: Dario Lombardo --- tools/debian-setup.sh | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/tools/debian-setup.sh b/tools/debian-setup.sh index 0184c45c97..a3fd5f9c98 100755 --- a/tools/debian-setup.sh +++ b/tools/debian-setup.sh @@ -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 \ No newline at end of file