From 2c7681b30683f602938000348b273f50abd0b788 Mon Sep 17 00:00:00 2001 From: Julien Oculi Date: Tue, 4 Jun 2024 16:34:01 +0200 Subject: [PATCH] feat: add install and deploy scripts for `zsh` --- zsh/_deploy.sh | 2 ++ zsh/_install.sh | 14 ++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 zsh/_deploy.sh create mode 100644 zsh/_install.sh diff --git a/zsh/_deploy.sh b/zsh/_deploy.sh new file mode 100644 index 0000000..752e5b1 --- /dev/null +++ b/zsh/_deploy.sh @@ -0,0 +1,2 @@ +# Setup zsh +cp ./zsh/zsh/* /root diff --git a/zsh/_install.sh b/zsh/_install.sh new file mode 100644 index 0000000..bd946c4 --- /dev/null +++ b/zsh/_install.sh @@ -0,0 +1,14 @@ +# Check if eza already installed +if [[ $(which eza) != "/usr/bin/eza" ]]; then + # Install sources and keys + mkdir -p /etc/apt/keyrings + wget -qO- https://raw.githubusercontent.com/eza-community/eza/main/deb.asc | gpg --dearmor -o /etc/apt/keyrings/gierens.gpg + echo "deb [signed-by=/etc/apt/keyrings/gierens.gpg] http://deb.gierens.de stable main" | tee /etc/apt/sources.list.d/gierens.list + chmod 644 /etc/apt/keyrings/gierens.gpg /etc/apt/sources.list.d/gierens.list +fi + +# Check if Oh-My-ZSH already installed +which omz &> /dev/null || sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" + +# Install or upgrade zsh and eza +nala install -y zsh eza