dotfiles/install.sh
2026-06-21 09:03:43 +02:00

35 lines
736 B
Bash
Executable file
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# Check stow is installed
echo "Checking stow is installed"
if [[ $(which stow 2>/dev/null) ]]; then
echo "stow is installed!"
else
echo "stow is not installed, exiting…"
exit 1
fi
echo "Checking eza is installed"
if [[ $(which eza 2>/dev/null) ]]; then
echo "eza is installed!"
else
echo "eza is not installed, exiting…"
exit 1
fi
# Check the folder is deploy in $HOME
echo "Check the folder is deploy in $HOME"
path=$(dirname $(pwd))
if [[ "$path" != "$HOME" ]]; then
echo "dotfiles folder must be cloned in your /\$HOMEdirectory"
echo "exiting…"
exit 1
fi
echo "dotfiles folder is in the right place"
echo "Stowing dotfiles..."
for folder in $(eza -D)
do
stow "$folder"
done
echo "done!"