summaryrefslogtreecommitdiff
path: root/trunk/src
diff options
context:
space:
mode:
authorfuzzyray <fuzzyray@gentoo.org>2005-09-09 20:35:17 +0000
committerfuzzyray <fuzzyray@gentoo.org>2005-09-09 20:35:17 +0000
commit090e99311440a57b9f46e79898dd7081627b0f9b (patch)
tree11e518846287f42efe8bce97a1fa7cc15a0fe3c5 /trunk/src
parentf8f778e428869bbaedcc8879f97157e02fcfd37f (diff)
downloadgentoolkit-090e99311440a57b9f46e79898dd7081627b0f9b.tar.gz
Remove stat call to fix bugs 102255 and 105381
svn path=/; revision=232
Diffstat (limited to 'trunk/src')
-rwxr-xr-xtrunk/src/revdep-rebuild/revdep-rebuild23
1 files changed, 2 insertions, 21 deletions
diff --git a/trunk/src/revdep-rebuild/revdep-rebuild b/trunk/src/revdep-rebuild/revdep-rebuild
index c67fb87..fbd7acb 100755
--- a/trunk/src/revdep-rebuild/revdep-rebuild
+++ b/trunk/src/revdep-rebuild/revdep-rebuild
@@ -256,27 +256,8 @@ else
WORKING_TEXT=""
fi
-# check if it's GNU's stat or BSD's stat...
-if stat 2>&1 | grep coreutils; then
- STAT="stat -c %Y "
-else
- STAT="stat -f %m "
-fi
-
-# If our temporary files are older than 1 day, don't use them
-TOO_OLD=$((`date +%s` - 86400))
-for file in ${LIST}*
-do
- if [ -f $file ]
- then
- FILE_AGE="$(${STAT} $file)"
- if [ $FILE_AGE -lt $TOO_OLD ]
- then
- rm -f ${LIST}*
- break
- fi
- fi
-done
+# If any of our temporary files are older than 1 day, remove them all
+[ "$(find "${LIST%/*}/." ! -name . -prune -name "${LIST##*/}*" -type f -mmin +1440)" != "" ] && rm -f ${LIST}*
# Don't use our previous files if environment doesn't match
if [ -f $LIST.0_env ]