mirror of
https://github.com/wahyd4/gvm.git
synced 2026-08-09 04:46:19 +10:00
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.
16 lines
577 B
Bash
16 lines
577 B
Bash
#!/usr/bin/env bash
|
|
. $GVM_ROOT/scripts/functions/tools
|
|
echo $1 | sed -n -e '/_.*_/ p' | $GREP_PATH "_" &> /dev/null
|
|
if [ "$?" == "0" ]; then
|
|
version=`echo $1 | sed 's/_\(.*\)_/\1/'`
|
|
if [[ ! -f $GVM_ROOT/pkgsets/$gvm_go_name/$gvm_pkgset_name/pkg.gvm/{{package_name}}/$version/bin/{{binary_name}} ]]; then
|
|
echo "GVM: Invalid version"
|
|
exit 1
|
|
fi
|
|
shift
|
|
$GVM_ROOT/pkgsets/$gvm_go_name/$gvm_pkgset_name/pkg.gvm/{{package_name}}/$version/bin/{{binary_name}} $@
|
|
else
|
|
$GVM_ROOT/pkgsets/$gvm_go_name/$gvm_pkgset_name/pkg.gvm/{{package_name}}/current/bin/{{binary_name}} $@
|
|
fi
|
|
|