Files
gvm/scripts/diff
T
Matt T. Proud 4e117a3ab8 Provide support for FreeBSD.
FreeBSD does not by default install the Bourne-Again Shell (bash); and
when it is installed, it is most certainly not installed to
``/bin/bash`` due to the nuances of the conventions around local site
packages.  Rather, it is installed to ``/usr/local/bin/bash``.

Golang explicitly supports FreeBSD, so it should only be reasonable for
GVM to support this target, too.  As a fix, the shell script shebang
definitions now use the ``env`` tool that comes from the _coreutils_
standard package, which is installed on all conventions-adhering Linux
distributions, Mac OS X, and FreeBSD.

FreeBSD prerequisites are now listed in the documentation.

I have tested this against FreeBSD 9.0 release branch on the amd64,
and it works satisfactorily now.
2012-11-18 20:10:59 +01:00

31 lines
696 B
Bash
Executable File

#!/usr/bin/env bash
. $GVM_ROOT/scripts/functions
version=$1
if [ "$version" != "" ]; then
fuzzy_match=`$LS_PATH $GVM_ROOT/gos | $SORT_PATH | $GREP_PATH "$version" | $HEAD_PATH -n 1 | $GREP_PATH "$version"` ||
display_fatal "Invalid version $version"
foldername=$GVM_ROOT/gos/$fuzzy_match
else
if [[ "$gvm_go_name" != "" ]]; then
foldername=$GVM_ROOT/gos/$gvm_go_name
else
display_fatal "No version selected"
fi
fi
if [[ -d $foldername ]]; then
cd $foldername
find . > /tmp/manifest.test
diff manifest /tmp/manifest.test
if [[ "$?" == "0" ]]; then
display_message "Clean $foldername"
else
display_message "*Dirty* $foldername"
fi
else
display_fatal "Invalid version"
fi