diff options
author | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2012-02-27 11:35:55 -0300 |
---|---|---|
committer | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2012-02-27 11:35:55 -0300 |
commit | da785c8272457a70f21942bf4943bfc69f4fbeb8 (patch) | |
tree | aca06d323bbe7720cba7189e8ac1c56bbc08f104 | |
parent | b3047be050482448ef6487aefe8193bf911807d6 (diff) |
Use only one find
-rwxr-xr-x | toru-path | 2 | ||||
-rwxr-xr-x | toru-utils | 9 |
2 files changed, 5 insertions, 6 deletions
@@ -27,6 +27,8 @@ for _pkgbuild in ${pkgbuilds[@]}; do done # TODO remove old paths +# by joining new paths to old paths and exclude the joining points from the +# cache (sort of a sql join) echo ${paths[@]} | tr ' ' "\n" | sort >> ${TORUPATH}/paths lastsync ${LASTSYNCFILE} @@ -59,17 +59,14 @@ get_pkgbuilds() { $QUIET || warning "Forcing upgrade" # Get all PKGBUILDs - pkgbuilds=($(find $@ -mindepth 2 -maxdepth 3 -type f -name 'PKGBUILD')) - + extra="" else - # Only find newer than lastsyncfile and read everything else from cache - pkgbuilds=($(find $@ -mindepth 2 -maxdepth 3 -type f -name 'PKGBUILD' -newer ${LASTSYNCFILE})) - + extra=" -newer ${LASTSYNCFILE}" fi # Return all PKGBUILDs found - echo ${pkgbuilds[@]} + find $@ -mindepth 2 -maxdepth 3 -type f -name 'PKGBUILD' ${extra} } # End inmediately but print a useful message |