From 46798e856bcfa70791e19e7729322ad2f425d157 Mon Sep 17 00:00:00 2001 From: Nicolas Reynolds Date: Tue, 1 Nov 2011 17:16:48 -0300 Subject: 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 --- toru-path | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 toru-path (limited to 'toru-path') 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} -- cgit v1.2.3-54-g00ecf