blob: bdf2f237b5436efcdc177b2b08ad69260b5a7264 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#!/bin/bash
source $(dirname $0)/toru-utils
LASTSYNCFILE=${TORUPATH}/lastsync.paths
# TODO pass other paths via flags
pkgbuilds=($(get_pkgbuilds ${ABSROOT}))
paths=()
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[@]} ${provides[@]}; do
paths+=(${_pkg/[<>=]*}:${fullpath})
done
done
echo ${paths[@]} | tr ' ' "\n" | sort >> ${TORUPATH}/paths
lastsync ${LASTSYNCFILE}
|