support chezmoi externals in load-zellij
This commit is contained in:
parent
81d9709c91
commit
8f197b24c5
|
@ -27,13 +27,20 @@ if is_sourced; then
|
||||||
}
|
}
|
||||||
refresh-zellij() {
|
refresh-zellij() {
|
||||||
${SET:-:} -x
|
${SET:-:} -x
|
||||||
if [ -z "$(env which zellij)" ] && ! [ -x ~/.local/bin/zellij ]; then
|
local bin_path=~/.local/bin/zellij
|
||||||
if [[ ! -r /tmp/zellij/bootstrap/zellij ]]; then
|
local cached_path=~/.cache/chezmoi/tmp/zellij
|
||||||
|
if [ -z "$(env which zellij)" ] && [ -x "${cached_path}" ]; then
|
||||||
|
printf "Grabbing zellij from the web!\n"
|
||||||
|
cp "${cached_path}" "${bin_path}"
|
||||||
|
fi
|
||||||
|
local cached_path=/tmp/zellij/bootstrap/zellij
|
||||||
|
if [ -z "$(env which zellij)" ] && ! [ -x "${bin_path}" ]; then
|
||||||
|
if [[ ! -r "${cached_path}" ]]; then
|
||||||
printf "Grabbing zellij from the web!\n"
|
printf "Grabbing zellij from the web!\n"
|
||||||
bash <(curl -sL zellij.dev/launch) "--help" > /dev/null 2>&1 || true
|
bash <(curl -sL zellij.dev/launch) "--help" > /dev/null 2>&1 || true
|
||||||
fi
|
fi
|
||||||
if [[ -r /tmp/zellij/bootstrap/zellij ]]; then
|
if [[ -r "${cached_path}" ]]; then
|
||||||
mv /tmp/zellij/bootstrap/zellij ~/.local/bin/zellij
|
mv "${cached_path}" "${bin_path}"
|
||||||
rm -fR /tmp/zellij
|
rm -fR /tmp/zellij
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue