From 2a5379a4d74290a163a0d0d8a4ead0665a925f97 Mon Sep 17 00:00:00 2001 From: theanonymousexyz Date: Thu, 14 Apr 2022 16:24:15 +0200 Subject: [PATCH] Add dependency checking to install script --- install.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 556b397..9bf6839 100755 --- a/install.sh +++ b/install.sh @@ -1,5 +1,10 @@ #!/usr/bin/env sh +echo "=> Checking dependencies..." + +command -v stow >/dev/null 2>&1 || { echo "Please install GNU Stow!"; exit 69; } + +sleep 0.5 echo "=> Determining OS..." if [ "$(uname -o)" = "Android" ] || [ "$(lsb_release -si)" = "Fedora" ]; then @@ -10,13 +15,13 @@ elif [ "$(lsb_release -si)" = "Artix" ]; then set -- "alacritty" "mako" "nvim" "scripts" "sway" "swaylock" "swaynag" "waybar" "zsh" else echo "OS not supported!" - exit 1 + exit 420 fi sleep 0.5 echo "=> Installing dotfile packages..." -cd -- "$(dirname -- $0)" +cd -P -- "$(readlink -e "$(dirname "$0")")" for pkg in "$@"; do sleep 0.1