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.
52 lines
993 B
Bash
Executable File
52 lines
993 B
Bash
Executable File
#!/usr/bin/env bash
|
|
. $GVM_ROOT/scripts/functions
|
|
|
|
function show_usage() {
|
|
echo "Usage: gvm listall [options]"
|
|
echo " -a, --all List all tags."
|
|
echo " -h, --help Display this message."
|
|
}
|
|
|
|
function read_command_line() {
|
|
tag_filter="release"
|
|
for i in $*; do
|
|
case $i in
|
|
-a|--all)
|
|
tag_filter=""
|
|
;;
|
|
-h|--help*)
|
|
show_usage
|
|
exit 0
|
|
;;
|
|
*)
|
|
echo "Invalid option $i"
|
|
show_usage
|
|
exit 65 # Bad arguments
|
|
;;
|
|
esac
|
|
done
|
|
}
|
|
|
|
read_command_line $@
|
|
|
|
echo
|
|
display_message "gvm gos (available)"
|
|
echo
|
|
versions=`curl -s https://go.googlecode.com/hg/.hgtags | awk '{ print $2 }' | $SORT_PATH`
|
|
if [[ $? -ne 0 ]]; then
|
|
display_fatal "Failed to get version list from Google"
|
|
fi
|
|
for version in $versions; do
|
|
if [[ "$tag_filter" == "release" ]]; then
|
|
if [[ "${version:0:7}" == "release" ]]; then
|
|
echo " $version"
|
|
elif [[ "${version:0:3}" == "go1" ]]; then
|
|
echo " $version"
|
|
fi
|
|
else
|
|
echo " $version"
|
|
fi
|
|
done
|
|
echo
|
|
|