aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-09-27 12:39:36 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-09-27 12:39:36 +0100
commitef1b982daa6119d8fdecae95697fd7016032e6a2 (patch)
treebe8f3d3bcec819d00fc07acb882da0959326cee8
parentb6e31d34168c6d5f79dc2c726d1b3c6330aad6c7 (diff)
downloadpaludis-ef1b982daa6119d8fdecae95697fd7016032e6a2.tar.gz
paludis-ef1b982daa6119d8fdecae95697fd7016032e6a2.tar.xz
Ignore ~files when counting config updates
Fixes: ticket:792
-rwxr-xr-xhooks/find_config_updates.hook6
1 files changed, 3 insertions, 3 deletions
diff --git a/hooks/find_config_updates.hook b/hooks/find_config_updates.hook
index 7a1c011..f050cfd 100755
--- a/hooks/find_config_updates.hook
+++ b/hooks/find_config_updates.hook
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# vim: set et sw=4 sts=4 :
-# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
+# Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh
#
# This file is part of the Paludis package manager. Paludis is free software;
# you can redistribute it and/or modify it under the terms of the GNU General
@@ -39,11 +39,11 @@ check_for_config_updates()
for prot in /etc ${CONFIG_PROTECT} ; do
if [[ -d "${ROOT%/}/${prot}" ]]; then
dir="${prot}"
- c=$(find "${ROOT%/}/${dir}" -iname '._cfg????_*' | wc -l )
+ c=$(find "${ROOT%/}/${dir}" -iname '._cfg????_*' -not -name '*~' | wc -l )
else
dir="${prot%/*}"
[[ -d "${ROOT%/}/${dir}" ]] || continue
- c=$(find "${ROOT%/}/${dir}" -maxdepth 1 -iname "._cfg????_${prot##*/}" | wc -l )
+ c=$(find "${ROOT%/}/${dir}" -maxdepth 1 -iname "._cfg????_${prot##*/}" -not -name '*~' | wc -l )
fi
if [[ ${c} -gt 0 ]] ; then
einfo_unhooked "Found ${c} files in ${ROOT%%+(/)}/${dir##+(/)}"