Don't let the script fail if PACKAGESITE is not set. Refs #107.

This commit is contained in:
Pedro Algarvio 2013-04-12 12:36:52 +01:00
parent 2e765b1784
commit ee829cb60b
2 changed files with 12 additions and 0 deletions

View file

@ -1,3 +1,9 @@
Version 1.5.X:
* Distro Support Fixed:
* FreeBSD (Don't let the script fail if PACKAGESITE is not
set)
Version 1.5.3:
* Return 0 or 1 from functions
* Convert several pipes into a single awk call

View file

@ -1846,11 +1846,17 @@ __freebsd_get_packagesite() {
BSD_ARCH="x86:32"
fi
# Since the variable might not be set, don't, momentarily treat it as a failure
set +o nounset
if [ "x${PACKAGESITE}" = "x" ]; then
echowarn "The environment variable PACKAGESITE is not set."
echowarn "The installation will, most likely fail since pkgbeta.freebsd.org does not yet contain any packages"
fi
BS_PACKAGESITE=${PACKAGESITE:-"http://pkgbeta.freebsd.org/freebsd:${DISTRO_MAJOR_VERSION}:${BSD_ARCH}/latest"}
# Treat unset variables as errors once more
set -o nounset
}
install_freebsd_9_stable_deps() {