2026-08-14 14:22:53 -04:00
|
|
|
#!/bin/sh
|
2026-10-13 09:45:51 -04:00
|
|
|
# Install the yazi plugins pinned in yazi/package.toml whenever it changes.
|
|
|
|
|
# ~/.config/yazi links to the source dir, so they land in yazi/plugins/
|
|
|
|
|
# (gitignored, except the vendored bunny.yazi).
|
|
|
|
|
# package.toml hash: {{ include "yazi/package.toml" | sha256sum }}
|
2026-08-14 14:22:53 -04:00
|
|
|
set -eu
|
|
|
|
|
command -v ya >/dev/null 2>&1 || exit 0
|
|
|
|
|
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/yazi/package.toml" ] || exit 0
|
2026-10-13 09:45:51 -04:00
|
|
|
# ya's clone cache is disposable and clones made by an older ya can break a
|
|
|
|
|
# newer one, so rebuild it once before giving up.
|
|
|
|
|
ya pkg install || {
|
|
|
|
|
rm -rf "${XDG_CACHE_HOME:-$HOME/.cache}/yazi/packages"
|
|
|
|
|
ya pkg install
|
|
|
|
|
}
|