build: bsd-setup.sh - make code like the others; FreeBSD gcrypt
This commit is contained in:
parent
6156e28a26
commit
41f14af980
|
@ -14,26 +14,28 @@
|
|||
#
|
||||
|
||||
function print_usage() {
|
||||
echo "\nUtility to setup a bsd-based system for Wireshark Development.\n"
|
||||
echo "The basic usage installs the needed software\n\n"
|
||||
echo "Usage: $0 [--install-optional] [...other options...]\n"
|
||||
echo "\t--install-optional: install optional software as well"
|
||||
echo "\t[other]: other options are passed as-is to pkg manager.\n"
|
||||
printf "\\nUtility to setup a bsd-based system for Wireshark Development.\\n"
|
||||
printf "The basic usage installs the needed software\\n\\n"
|
||||
printf "Usage: $0 [--install-optional] [...other options...]\\n"
|
||||
printf "\\t--install-optional: install optional software as well\\n"
|
||||
printf "\\t[other]: other options are passed as-is to pkg manager.\\n"
|
||||
}
|
||||
|
||||
ADDITIONAL=0
|
||||
OPTIONS=
|
||||
for op
|
||||
do
|
||||
if [ "$op" = "--install-optional" ]
|
||||
then
|
||||
ADDITIONAL=1
|
||||
elif [ "$op" = "--help" ]
|
||||
then
|
||||
print_usage
|
||||
exit 0
|
||||
else
|
||||
OPTIONS="$OPTIONS $op"
|
||||
fi
|
||||
for arg; do
|
||||
case $arg in
|
||||
--help)
|
||||
print_usage
|
||||
exit 0
|
||||
;;
|
||||
--install-optional)
|
||||
ADDITIONAL=1
|
||||
;;
|
||||
*)
|
||||
OPTIONS="$OPTIONS $arg"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Check if the user is root
|
||||
|
@ -162,7 +164,7 @@ echo "libilbc is unavailable"
|
|||
# Add OS-specific required/optional packages
|
||||
# Those not listed don't require additions.
|
||||
case `uname` in
|
||||
NetBSD)
|
||||
FreeBSD | NetBSD)
|
||||
add_package ADDITIONAL_LIST libgcrypt || echo "libgcrypt is unavailable"
|
||||
;;
|
||||
esac
|
||||
|
@ -170,7 +172,7 @@ esac
|
|||
ACTUAL_LIST=$BASIC_LIST
|
||||
|
||||
# Now arrange for optional support libraries
|
||||
if [ "$ADDITIONAL" != "" ]
|
||||
if [ $ADDITIONAL -ne 0 ]
|
||||
then
|
||||
ACTUAL_LIST="$ACTUAL_LIST $ADDITIONAL_LIST"
|
||||
fi
|
||||
|
@ -181,7 +183,7 @@ then
|
|||
exit 2
|
||||
fi
|
||||
|
||||
if [ "$ADDITIONAL" == "" ]
|
||||
if [ $ADDITIONAL -eq 0 ]
|
||||
then
|
||||
echo -e "\n*** Optional packages not installed. Rerun with --install-optional to have them.\n"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue