summaryrefslogtreecommitdiffstats
path: root/release
diff options
context:
space:
mode:
authorgjb <gjb@FreeBSD.org>2015-05-06 14:59:16 +0000
committergjb <gjb@FreeBSD.org>2015-05-06 14:59:16 +0000
commit1a0871d957af1922d7479ae462cb31a2a2ee3c2b (patch)
tree548a9c7a541104f26f4eaee316df571c75329fac /release
parent2b407e277c530d5c2e5fa176093792c2aafe7db6 (diff)
downloadFreeBSD-src-1a0871d957af1922d7479ae462cb31a2a2ee3c2b.zip
FreeBSD-src-1a0871d957af1922d7479ae462cb31a2a2ee3c2b.tar.gz
Move where the configuration file is sourced if '-c'
is specified. If the configuration file does not exist, proceed with the default options instead of exiting. Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'release')
-rwxr-xr-xrelease/release.sh14
1 files changed, 8 insertions, 6 deletions
diff --git a/release/release.sh b/release/release.sh
index 16d5b9f..f1de922 100755
--- a/release/release.sh
+++ b/release/release.sh
@@ -328,12 +328,6 @@ main() {
case ${opt} in
c)
RELEASECONF="${OPTARG}"
- if [ ! -e "${RELEASECONF}" ]; then
- echo "ERROR: Configuration file ${RELEASECONF} does not exist."
- exit 1
- fi
- # Source the specified configuration file for overrides
- . ${RELEASECONF}
;;
\?)
usage
@@ -341,6 +335,14 @@ main() {
esac
done
shift $(($OPTIND - 1))
+ if [ ! -z "${RELEASECONF}" ]; then
+ if [ -e "${RELEASECONF}" ]; then
+ . ${RELEASECONF}
+ else
+ echo "Nonexistent configuration file: ${RELEASECONF}"
+ echo "Using default build environment."
+ fi
+ fi
env_check
trap "umount ${CHROOTDIR}/dev" EXIT # Clean up devfs mount on exit
chroot_setup
OpenPOWER on IntegriCloud