tools: minor changes in bsd-setup script.

Changes:
- use bash
- fix list checks

Change-Id: Idb933155035091974460d6957a9f6a223f6680dc
Reviewed-on: https://code.wireshark.org/review/35872
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
This commit is contained in:
Dario Lombardo 2020-01-20 15:19:12 +01:00
parent b0c5f2230d
commit 23b91bdcd0
1 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
# Setup development environment on BSD-like platforms.
#
# Tested on: FreeBSD, OpenBSD, NetBSD.
@ -160,18 +160,18 @@ esac
ACTUAL_LIST=$BASIC_LIST
# Now arrange for optional support libraries
if [ $ADDITIONAL -ne 0 ]
if [ "$ADDITIONAL" != "" ]
then
ACTUAL_LIST="$ACTUAL_LIST $ADDITIONAL_LIST"
fi
$PM $PM_OPTIONS $ACTUAL_LIST $OPTIONS
if [ $? -ne 0 ]
if [ $? ]
then
exit 2
fi
if [ $ADDITIONAL -eq 0 ]
if [ "$ADDITIONAL" == "" ]
then
echo -e "\n*** Optional packages not installed. Rerun with --install-optional to have them.\n"
fi