Changeset View
Changeset View
Standalone View
Standalone View
head/usr.sbin/freebsd-update/freebsd-update.sh
Show First 20 Lines • Show All 215 Lines • ▼ Show 20 Lines | config_KeepModifiedMetadata () { | ||||
else | else | ||||
return 1 | return 1 | ||||
fi | fi | ||||
} | } | ||||
# Add to the list of components which should be kept updated. | # Add to the list of components which should be kept updated. | ||||
config_Components () { | config_Components () { | ||||
for C in $@; do | 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 [ "$C" = "src" ]; then | ||||
if [ -e "${BASEDIR}/usr/src/COPYRIGHT" ]; then | if [ -e "${BASEDIR}/usr/src/COPYRIGHT" ]; then | ||||
COMPONENTS="${COMPONENTS} ${C}" | COMPONENTS="${COMPONENTS} ${C}" | ||||
else | else | ||||
echo "src component not installed, skipped" | echo "src component not installed, skipped" | ||||
fi | fi | ||||
else | else | ||||
COMPONENTS="${COMPONENTS} ${C}" | COMPONENTS="${COMPONENTS} ${C}" | ||||
▲ Show 20 Lines • Show All 3,047 Lines • ▼ Show 20 Lines | |||||
# Using the command line, configuration file, and defaults, | # Using the command line, configuration file, and defaults, | ||||
# set all the parameters which are needed later. | # set all the parameters which are needed later. | ||||
get_params () { | get_params () { | ||||
init_params | init_params | ||||
parse_cmdline $@ | parse_cmdline $@ | ||||
parse_conffile | parse_conffile | ||||
default_params | default_params | ||||
finalize_components_config ${COMPONENTS} | |||||
} | } | ||||
# Fetch command. Make sure that we're being called | # Fetch command. Make sure that we're being called | ||||
# interactively, then run fetch_check_params and fetch_run | # interactively, then run fetch_check_params and fetch_run | ||||
cmd_fetch () { | cmd_fetch () { | ||||
if [ ! -t 0 -a $NOTTYOK -eq 0 ]; then | if [ ! -t 0 -a $NOTTYOK -eq 0 ]; then | ||||
echo -n "`basename $0` fetch should not " | echo -n "`basename $0` fetch should not " | ||||
echo "be run non-interactively." | echo "be run non-interactively." | ||||
▲ Show 20 Lines • Show All 67 Lines • Show Last 20 Lines |