Make install script run on FreeBSD.

This commit is contained in:
David Tomaschik
2018-01-30 05:35:34 +00:00
parent 0431c83423
commit 2c2ac626e5

View File

@@ -1,14 +1,21 @@
#!/bin/bash
#!/usr/bin/env bash
set -o nounset
set -o errexit
FINDTYPE="-xtype"
case $(uname) in
Linux)
FINDTYPE="-xtype"
;;
Darwin|*BSD)
FINDTYPE="-type"
;;
*)
echo "Unknown OS: $(uname), guessing no GNU utils."
FINDTYPE="-type"
;;
esac
if [ `uname` == 'Darwin' ] ; then
# MacOS specifics
FINDTYPE="-type"
fi
function prerequisites {
if which zsh > /dev/null 2>&1 ; then