diff options
author | jjanzen <jjanzen@jjanzen.ca> | 2025-03-03 15:20:47 -0600 |
---|---|---|
committer | jjanzen <jjanzen@jjanzen.ca> | 2025-03-03 15:20:47 -0600 |
commit | befa9831669f3e8c29745497c174a325f7291ef6 (patch) | |
tree | 8f8430d6cea1f33931acc5f60821933412ea7aee | |
parent | 343be11fa2eab1f7ee94d6cb05a66a6743fed903 (diff) |
system changes
-rw-r--r-- | macos.local/.flake/home/scripts/manage-system.org | 50 |
1 files changed, 26 insertions, 24 deletions
diff --git a/macos.local/.flake/home/scripts/manage-system.org b/macos.local/.flake/home/scripts/manage-system.org index 91670f0..4563432 100644 --- a/macos.local/.flake/home/scripts/manage-system.org +++ b/macos.local/.flake/home/scripts/manage-system.org @@ -5,7 +5,10 @@ usage () { - echo "Usage: $0 [-u/-i]" + echo "Usage: $0 [command] where command is one of" + echo "help - show this message and exit" + echo "update - update the system" + echo "install - install the system configurations" } [ "$#" -eq 0 ] && usage && exit 1 @@ -13,27 +16,26 @@ dir="$pwd" cd ~/.dotfiles || exit 1 - while getopts ":hui" arg; do - case "$arg" in - h) - usage - cd "$dir" || exit 1 - exit 0 - ;; - u) - make update - cd "$dir" || exit 1 - exit 0 - ;; - i) - make install - cd "$dir" || exit 1 - exit 0 - ;; - ,*) - cd "$dir" || exit 1 - exit 1 - ;; - esac - done + case "$1" in + help) + usage + cd "$dir" || exit 1 + exit 0 + ;; + update) + make update + cd "$dir" || exit 1 + exit 0 + ;; + install) + make install + cd "$dir" || exit 1 + exit 0 + ;; + ,*) + usage + cd "$dir" || exit 1 + exit 1 + ;; + esac #+end_src |