#!/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 /\$HOME directory" 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!"