Don't assume Bash.

At least on my OpenBSD 6.3 VM, there's no Bash installed; just use
/bin/sh.

Fix two places that use csh-style ">& /dev/null" to use
"> /dev/null 2>&1" instead.

Change-Id: I48656c47e89b3ad09f3c2d9e3c90dfad7afabb71
Reviewed-on: https://code.wireshark.org/review/29214
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2018-08-21 02:37:40 -07:00
parent 5673a58bfa
commit ea515c5f2d

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh
# Setup development environment on BSD-like platforms.
#
# Tested on: FreeBSD, OpenBSD, NetBSD.
@ -96,9 +96,9 @@ add_package() {
# an *exact* search fails, as that requires that
# the package name include the version number.
#
$PM_SEARCH -g "$pkgname*" >& /dev/null || return 1
$PM_SEARCH -g "$pkgname*" > /dev/null 2>&1 || return 1
else
$PM_SEARCH "$pkgname" >& /dev/null || return 1
$PM_SEARCH "$pkgname" > /dev/null 2>&1 || return 1
fi
# package is found, append it to list