build: add dart cache

This commit is contained in:
George Rawlinson 2021-11-25 06:40:59 +00:00
parent f7a455b9ec
commit ab1b5765a1
Signed by: grawlinson
GPG key ID: E0959FEA8B550539

View file

@ -30,16 +30,24 @@ for package in "${PACKAGES[@]}"; do
# capture output for parsing dependencies # capture output for parsing dependencies
makepkg_output=$(makepkg --printsrcinfo) makepkg_output=$(makepkg --printsrcinfo)
# cache downloaded crates #
# cache various downloads
#
# rust - crates
if grep -q "depends = rust\|cargo" <<<"$makepkg_output"; then if grep -q "depends = rust\|cargo" <<<"$makepkg_output"; then
EXTRA_ARGS+=(--bind-rw /var/cache/cargo:/build/.cargo) EXTRA_ARGS+=(--bind-rw /var/cache/cargo:/build/.cargo)
fi fi
# cache downloaded modules # go - modules
if grep -q "depends = go" <<<"$makepkg_output"; then if grep -q "depends = go" <<<"$makepkg_output"; then
EXTRA_ARGS+=(--bind-rw /var/cache/golang:/build/go) EXTRA_ARGS+=(--bind-rw /var/cache/golang:/build/go)
fi fi
# dart - packages
if grep -q "depends = dart" <<<"$makepkg_output"; then
EXTRA_ARGS+=(--bind-rw /var/cache/dartlang:/build/.pub-cache)
fi
# build signed package in chroot & add to local repo # build signed package in chroot & add to local repo
aur build \ aur build \
--chroot \ --chroot \