manage.sh: add help

This commit is contained in:
joachimschmidt557 2023-08-22 14:00:18 +02:00
parent fd037b930b
commit 28d59a7c0e
No known key found for this signature in database
GPG key ID: E0B575BE2884ACC5

View file

@ -193,7 +193,7 @@ case $1 in
("install") ("install")
mode="install" mode="install"
if [ -z $2 ] ; then if [ -z $2 ] || [ $2 = "--help" ]; then
echo "usage: manage.sh install [target] (source)" echo "usage: manage.sh install [target] (source)"
exit 1 exit 1
fi fi
@ -201,6 +201,19 @@ case $1 in
install_target=$2 install_target=$2
install_source=$3 install_source=$3
;;
("help"|"--help")
if [ -z $2 ] ; then
cat <<EOF
usage: manage.sh [command] [options]
Commands:
status View all dotfiles
install Install new dotfiles
EOF
exit 1
fi
;; ;;
*) *)
echo "Unrecognized command: '$1'" echo "Unrecognized command: '$1'"