feat(scripts): Add --help flags to all flake apps
Add consistent --help/-h argument handling to update-doomemacs.sh, rotate-wallpaper.sh, and upgrade.sh scripts. Each script now displays usage information and a description of what it does. update-claude-code already had --help support.
This commit is contained in:
@@ -1,6 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Parse arguments
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
--help|-h)
|
||||
echo "Usage: $0 [OPTIONS]"
|
||||
echo ""
|
||||
echo "Update Doom Emacs to the latest commit from the doomemacs repository."
|
||||
echo ""
|
||||
echo "This script fetches the latest commit SHA from the default branch,"
|
||||
echo "updates the rev and sha256 in home/roles/emacs/default.nix, and"
|
||||
echo "prepares the configuration for a system rebuild."
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " --help, -h Show this help message"
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Unknown option: $1"
|
||||
echo "Use --help for usage information"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Colors for output
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
|
||||
Reference in New Issue
Block a user