aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/freebsd-update
diff options
context:
space:
mode:
authorMichael Gmelin <grembo@FreeBSD.org>2019-09-19 21:13:51 +0000
committerMichael Gmelin <grembo@FreeBSD.org>2019-09-19 21:13:51 +0000
commit12294db4ac126ae4d66cc216d3def3f6cd2a4b00 (patch)
tree5bc7131a67da2379843681e9379e9b2bc733da4b /usr.sbin/freebsd-update
parent20674acb7053a45f259e66f3b57076b96a4889df (diff)
downloadsrc-12294db4ac126ae4d66cc216d3def3f6cd2a4b00.tar.gz
src-12294db4ac126ae4d66cc216d3def3f6cd2a4b00.zip
Fix src component detection
Reviewed by: emaste MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D21579
Notes
Notes: svn path=/head/; revision=352542
Diffstat (limited to 'usr.sbin/freebsd-update')
-rw-r--r--usr.sbin/freebsd-update/freebsd-update.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh
index 7c11d61f70ff..53a95eef1fa7 100644
--- a/usr.sbin/freebsd-update/freebsd-update.sh
+++ b/usr.sbin/freebsd-update/freebsd-update.sh
@@ -221,6 +221,14 @@ config_KeepModifiedMetadata () {
# Add to the list of components which should be kept updated.
config_Components () {
for C in $@; do
+ COMPONENTS="${COMPONENTS} ${C}"
+ done
+}
+
+# Remove src component from list if it isn't installed
+finalize_components_config () {
+ COMPONENTS=""
+ for C in $@; do
if [ "$C" = "src" ]; then
if [ -e "${BASEDIR}/usr/src/COPYRIGHT" ]; then
COMPONENTS="${COMPONENTS} ${C}"
@@ -3284,6 +3292,7 @@ get_params () {
parse_cmdline $@
parse_conffile
default_params
+ finalize_components_config ${COMPONENTS}
}
# Fetch command. Make sure that we're being called