Added zellij auto updater

This commit is contained in:
Lockszmith 2023-11-08 18:48:58 -05:00
parent 0c20efd44d
commit fc9a93c2bc
1 changed files with 16 additions and 0 deletions

16
zellij Executable file
View File

@ -0,0 +1,16 @@
#! /usr/bin/env bash
set -e
ZELLIJ_PATH="${ZELLIJ_PATH:-$(which zellij.latest)}" || true
[[ -n "${ZELLIJ_PATH}" ]] || ZELLIJ_PATH="$HOME/bin/zellij.latest"
if [[ ! -x "${ZELLIJ_PATH}" || -n "$UPGRADE" ]]; then
[[ -d /tmp/zellij ]] && rm -fR /tmp/zellij* ]]
bash <(curl -qsL zellij.dev/launch) --help > /dev/null
cp /tmp/zellij/bootstrap/zellij ~/bin/zellij.latest
fi
[[ -x "${ZELLIJ_PATH:?"Can't find zellij executable"}" ]]
exec $ZELLIJ_PATH "${@}"