aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/freebsd-update
diff options
context:
space:
mode:
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