local find_opts
local path
- for path in ${CONFIG_PROTECT} ; do
+ for path in ${SCAN_PATHS} ; do
path="${EROOT%/}${path}"
[[ -w ${path} ]] || die "Need write access to ${path}"
cat <<-EOF
etc-update: Handle configuration file updates
- Usage: etc-update [options]
+ Usage: etc-update [options] [paths to scan]
+
+ If no paths are specified, then \${CONFIG_PROTECT} will be used.
Options:
-d, --debug Enable shell debugging
-v|--verbose) VERBOSE=true;;
-V|--version) emerge --version; exit 0;;
--automode) parse_automode_flag $2 && shift || usage 1 "Invalid mode '$2'";;
- *) usage 1 "Invalid option '$1'";;
+ -*) usage 1 "Invalid option '$1'";;
+ *) break;;
esac
shift
done
)
eval $(portageq envvar -v ${portage_vars[@]})
export PORTAGE_TMPDIR
+SCAN_PATHS=${*:-${CONFIG_PROTECT}}
TMP="${PORTAGE_TMPDIR}/etc-update-$$"
trap "die terminated" SIGTERM
fi
if ${VERBOSE} ; then
- for v in ${portage_vars[@]} ${cfg_vars[@]} TMP ; do
+ for v in ${portage_vars[@]} ${cfg_vars[@]} TMP SCAN_PATHS ; do
echo "${v}=${!v}"
done
fi
etc-update \- handle configuration file updates
.SH SYNOPSIS
.BR etc-update
-[\fIoptions\fR] [\fI--automode <mode>\fR]
+[\fIoptions\fR] [\fI--automode <mode>\fR] [\fIpaths to scan\fR]
.SH DESCRIPTION
.I etc-update
is supposed to be run after merging a new package to see if
will prompt the user for a decision.
.PP
.I etc-update
-will check all directories in the \fICONFIG_PROTECT\fR variable. All
+will check all directories specified on the command line. If no paths
+are given, then the \fICONFIG_PROTECT\fR variable will be used. All
config files found in \fICONFIG_PROTECT_MASK\fR will automatically be
updated for you by \fIetc-update\fR. See \fBmake.conf\fR(5) for more
information.