diff options
author | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2011-11-01 17:16:48 -0300 |
---|---|---|
committer | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2011-11-01 17:16:48 -0300 |
commit | 46798e856bcfa70791e19e7729322ad2f425d157 (patch) | |
tree | 66aad71e0a139d190fe06b6475c575e962b17d02 /toru-path | |
parent | 4c4f7255e97bde5524e3798b4b777a94e37da23d (diff) |
PKGBUILD path caching
* Toru is overly complex
* Moved path caching to toru-path. Run it without arguments to update the
PKGBUILD paths cache
* Updated fullpkg to check this new paths cache
Diffstat (limited to 'toru-path')
-rwxr-xr-x | toru-path | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/toru-path b/toru-path new file mode 100755 index 0000000..82378a4 --- /dev/null +++ b/toru-path @@ -0,0 +1,31 @@ +#!/bin/bash + +source $(dirname $0)/toru-utils + +LASTSYNCFILE=${TORUPATH}/lastsync.paths + +# TODO pass other paths via flags +pkgbuilds=($(get_pkgbuilds ${ABSROOT})) +paths=() +# TODO create a --ignore flag +ignore=($@) + +msg "Updating path cache" +msg2 "${#pkgbuilds[@]} PKGBUILDs to update" +for _pkgbuild in ${pkgbuilds[@]}; do + $DEBUG && plain "$_pkgbuild" + source ${_pkgbuild} || { + error "${_pkgbuild} contains errors, skipping" + continue + } + + fullpath=$(dirname $(readlink -f ${_pkgbuild})) + + for _pkg in ${pkgname[@]}; do + paths+=(${_pkg}:${fullpath}) + done +done + +echo ${paths[@]} | tr ' ' "\n" | sort >> ${TORUPATH}/paths + +lastsync ${LASTSYNCFILE} |