diff --git a/stow.sh b/stow.sh index 236b4a3..a944a11 100755 --- a/stow.sh +++ b/stow.sh @@ -1,11 +1,36 @@ #!/bin/bash +display_help() { + echo "Usage: [-s | -u] [-h]" + echo " -s Stow dotfiles" + echo " -u Unstow dotfiles" + echo " -h Display this help message" +} + stow_dotfiles() { stow dots stow -d dots -S zsh -t ~/ stow hyprland - echo "Dotfiles stowed successfully!" } -stow_dotfiles +unstow_dotfiles() { + stow -D dots + stow -D -d dots -t ~/ zsh + stow -D hyprland + echo "Dotfiles unstowed successfully!" +} + +while getopts ":suh" opt; do + case $opt in + s) + stow_dotfiles + ;; + u) + unstow_dotfiles + ;; + *) + display_help + ;; + esac +done