summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-06-28 16:12:28 +0000
committerMike Frysinger <vapier@gentoo.org>2009-06-28 16:12:28 +0000
commit06a37a97b6963b0ee68740bac08501dc467801da (patch)
tree52ff5b488db1c97f233371f63b320c02bc589827
parent56c59193837917afa92713ffe3f93fedf16e94be (diff)
downloadportage-06a37a97b6963b0ee68740bac08501dc467801da.tar.gz
portage-06a37a97b6963b0ee68740bac08501dc467801da.tar.bz2
portage-06a37a97b6963b0ee68740bac08501dc467801da.zip
make sure etc-update sorts updates in the order (1) leading dir path (2) filename (3) cfg update
svn path=/main/trunk/; revision=13723
-rwxr-xr-xbin/etc-update4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/etc-update b/bin/etc-update
index d84907cb7..03fef8d18 100755
--- a/bin/etc-update
+++ b/bin/etc-update
@@ -63,8 +63,8 @@ scan() {
# The below set -f turns off file name globbing in the ${find_opts} expansion.
for file in $(set -f ; find ${path}/ ${find_opts} \
! -name '.*~' ! -iname '.*.bak' -print |
- sed -e "s:\(^.*/\)\(\._cfg[0-9]*_\)\(.*$\):\1\2\3\%\2\%\3:" |
- sort -t'%' -k3 -k2 | LANG=POSIX LC_ALL=POSIX cut -f1 -d'%'); do
+ sed -e "s:\(^.*/\)\(\._cfg[0-9]*_\)\(.*$\):\1\2\3\%\1%\2\%\3:" |
+ sort -t'%' -k2,2 -k4,4 -k3,3 | LANG=POSIX LC_ALL=POSIX cut -f1 -d'%'); do
rpath=$(echo "${file/\/\///}" | sed -e "s:/[^/]*$::")
rfile=$(echo "${file/\/\///}" | sed -e "s:^.*/::")