summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-03-17 15:56:33 -0700
committerZac Medico <zmedico@gentoo.org>2012-03-17 15:56:33 -0700
commite769fdbec25f2e77953619bc131f15518a33ad1a (patch)
tree362a295a78e795d9b8063ef4a9453fedc758cf5c
parentOmit EPREFIX from paths in unicode QA Notice. (diff)
downloadportage-e769fdbec25f2e77953619bc131f15518a33ad1a.tar.gz
portage-e769fdbec25f2e77953619bc131f15518a33ad1a.tar.bz2
portage-e769fdbec25f2e77953619bc131f15518a33ad1a.zip
etc-update: ignore non-existent CONFIG_PROTECT
-rwxr-xr-xbin/etc-update7
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/etc-update b/bin/etc-update
index 135de4557..b07652075 100755
--- a/bin/etc-update
+++ b/bin/etc-update
@@ -73,8 +73,6 @@ scan() {
for path in ${SCAN_PATHS} ; do
path="${EROOT%/}${path}"
- [[ -w ${path} ]] || die "Need write access to ${path}"
-
if [[ ! -d ${path} ]] ; then
[[ ! -f ${path} ]] && continue
local my_basename="${path##*/}"
@@ -86,6 +84,11 @@ scan() {
fi
find_opts+=( ! -name '.*~' ! -iname '.*.bak' -print )
+ if [ ! -w "${path}" ] ; then
+ [ -e "${path}" ] || continue
+ die "Need write access to ${path}"
+ fi
+
local file ofile b=$'\001'
for file in $(find "${path}"/ "${find_opts[@]}" |
sed \