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.
This commit is contained in:
Matt T. Proud
2012-11-18 20:10:59 +01:00
parent b0ffc5c3c5
commit 4e117a3ab8
30 changed files with 46 additions and 31 deletions
+8 -1
View File
@@ -46,7 +46,7 @@ To completely remove gvm and all installed Go versions and packages:
If that doesn't work see the troubleshooting steps at the bottom of this page.
Mac OSX Requirements
Mac OS X Requirements
====================
Install mercurial from http://mercurial.berkwood.com/
@@ -60,6 +60,13 @@ Linux Requirements
sudo apt-get install bison
sudo apt-get install gcc
FreeBSD Requirements
====================
sudo pkg_add -r bash
sudo pkg_add -r git
sudo pkg_add -r mercurial
Troubleshooting
===============
Sometimes especially during upgrades the state of gvm's files can get mixed up. This is mostly true for upgrade from older version than 0.0.8. Changes are slowing down and a LTR is imminent. But for now `rm -rf ~/.gvm` will always remove gvm. Stay tuned!
+10 -2
View File
@@ -42,7 +42,7 @@ To completely remove gvm and all installed Go versions and packages:
gvm implode
Mac OSX Requirements
Mac OS X Requirements
====================
Install mercurial from http://mercurial.berkwood.com/
@@ -54,4 +54,12 @@ Linux Requirements
sudo apt-get install make
sudo apt-get install binutils
sudo apt-get install bison
sudo apt-get install gcc
sudo apt-get install gcc
FreeBSD Requirements
====================
sudo pkg_add -r bash
sudo pkg_add -r git
sudo pkg_add -r mercurial
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
if [ -z "$GVM_ROOT" ]; then
tput sgr0
tput setaf 1
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
function gvm_prompt() {
if [[ "$1" == "g" ]]; then
echo $gvm_go_name
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
display_error() {
tput sgr0
tput setaf 1
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. $GVM_ROOT/scripts/functions
command=$1
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. $GVM_ROOT/scripts/functions
[[ $1 != "" ]] ||
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. $GVM_ROOT/scripts/functions
[[ $1 != "" ]] ||
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. $GVM_ROOT/scripts/functions
echo
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. $GVM_ROOT/scripts/functions
display_usage() {
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. $GVM_ROOT/scripts/functions
version=$1
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. $GVM_ROOT/scripts/functions || return 1
function gvm() {
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
function gvm_pkgset_use() {
[[ "$1" != "" ]] ||
display_error "Please specify a package set" || return 1
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
function gvm_use() {
[[ "$1" != "" ]] ||
display_error "Please specifiy the version" || return 1
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
LS_ERROR="GVM couldn't find ls"
GREP_ERROR="GVM couldn't find grep"
SORT_ERROR="GVM couldn't find sort"
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
for function in $GVM_ROOT/scripts/function/*; do
. $function
done
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. $GVM_ROOT/scripts/functions
[[ -d $GVM_ROOT/.git ]] || mv $GVM_ROOT/git.bak $GVM_ROOT/.git &> /dev/null ||
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. $GVM_ROOT/scripts/functions
# Check for hg
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. $GVM_ROOT/scripts/functions
function show_usage() {
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. $GVM_ROOT/scripts/functions
echo
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. $GVM_ROOT/scripts/functions
function show_usage() {
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. $GVM_ROOT/scripts/functions
[[ $gvm_go_name != "" ]] ||
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. $GVM_ROOT/scripts/functions
[[ $1 != "" ]] ||
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. $GVM_ROOT/scripts/functions
[[ $gvm_go_name != "" ]] ||
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. $GVM_ROOT/scripts/functions
[[ $gvm_pkgset_name != "" ]] ||
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. $GVM_ROOT/scripts/functions
echo
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. $GVM_ROOT/scripts/functions/tools
echo $1 | sed -n -e '/_.*_/ p' | $GREP_PATH "_" &> /dev/null
if [ "$?" == "0" ]; then
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. $GVM_ROOT/scripts/functions
[[ "$1" == "" ]] &&
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. $GVM_ROOT/scripts/functions
cd $GVM_ROOT/archive/go &> /dev/null ||
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash -ex
#!/usr/bin/env bash -ex
TEST_OUTPUT=`gvm version`
[ "$TEST_OUTPUT" != "" ]
echo "Success!"