Add dependency checking to install script
This commit is contained in:
parent
a6836fa503
commit
2a5379a4d7
|
@ -1,5 +1,10 @@
|
||||||
#!/usr/bin/env sh
|
#!/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..."
|
echo "=> Determining OS..."
|
||||||
|
|
||||||
if [ "$(uname -o)" = "Android" ] || [ "$(lsb_release -si)" = "Fedora" ]; then
|
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"
|
set -- "alacritty" "mako" "nvim" "scripts" "sway" "swaylock" "swaynag" "waybar" "zsh"
|
||||||
else
|
else
|
||||||
echo "OS not supported!"
|
echo "OS not supported!"
|
||||||
exit 1
|
exit 420
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
echo "=> Installing dotfile packages..."
|
echo "=> Installing dotfile packages..."
|
||||||
|
|
||||||
cd -- "$(dirname -- $0)"
|
cd -P -- "$(readlink -e "$(dirname "$0")")"
|
||||||
|
|
||||||
for pkg in "$@"; do
|
for pkg in "$@"; do
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
|
|
Loading…
Reference in a new issue