From fc9a93c2bcce5566a642c513492b0208ebf46412 Mon Sep 17 00:00:00 2001 From: Lockszmith Date: Wed, 8 Nov 2023 18:48:58 -0500 Subject: [PATCH] Added zellij auto updater --- zellij | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 zellij diff --git a/zellij b/zellij new file mode 100755 index 0000000..f108f60 --- /dev/null +++ b/zellij @@ -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 "${@}"