aboutsummaryrefslogtreecommitdiff
path: root/release/release.sh
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2015-05-06 14:59:16 +0000
committerGlen Barber <gjb@FreeBSD.org>2015-05-06 14:59:16 +0000
commit81cfc2845bac84181553b3fe436e5830f6ee7b7a (patch)
tree548a9c7a541104f26f4eaee316df571c75329fac /release/release.sh
parent43eee0751f6113a8d88680c263440a20688f8ee3 (diff)
downloadsrc-81cfc2845bac84181553b3fe436e5830f6ee7b7a.tar.gz
src-81cfc2845bac84181553b3fe436e5830f6ee7b7a.zip
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
Notes
Notes: svn path=/projects/release-arm-redux/; revision=282544
Diffstat (limited to 'release/release.sh')
-rwxr-xr-xrelease/release.sh14
1 files changed, 8 insertions, 6 deletions
diff --git a/release/release.sh b/release/release.sh
index 16d5b9f0544a..f1de9229ce57 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