From 23981d7096199a8b08fb4be06a4e8e56a311834d Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Mon, 27 Nov 2023 00:27:27 +0100 Subject: [PATCH] update: whitespace and line length cleanups. This should contain no functional modifications. Signed-off-by: Denis 'GNUtoo' Carikli Acked-by: Adrien 'neox' Bourmault --- update | 56 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/update b/update index 28ea655..d9460d6 100755 --- a/update +++ b/update @@ -69,34 +69,34 @@ mode="${1}" [ "${mode}" = help ] && help && exit 0 if [ $# -gt 1 ]; then + option="${2}" + shift 2 - option="${2}" - shift 2 - - case "${option}" in - list) - printf "Available options for mode '%s':\n\n" "${mode}" - listoptions "${mode}" - ;; - all) - for option in $(listoptions "${mode}"); do - "${update}"/"${mode}"/"${option}" $@ - done - ;; - *) - if [ -d "${update}"/"${mode}"/ ]; then - if [ -f "${update}"/"${mode}"/"${option}" ]; then - "${update}"/"${mode}"/"${option}" $@ - else - help - die "Invalid option for '${mode}'. See './update ${mode} list'." - fi - else - help - die "Invalid mode '${mode}'. See './update help'." - fi - esac + case "${option}" in + list) + printf "Available options for mode '%s':\n\n" "${mode}" + listoptions "${mode}" + ;; + all) + for option in $(listoptions "${mode}"); do + "${update}"/"${mode}"/"${option}" $@ + done + ;; + *) + if [ -d "${update}"/"${mode}"/ ]; then + if [ -f "${update}"/"${mode}"/"${option}" ]; then + "${update}"/"${mode}"/"${option}" $@ + else + help + die "Invalid option for '${mode}'." \ + " See './update ${mode} list'." + fi + else + help + die "Invalid mode '${mode}'. See './update help'." + fi + esac else - help - exit 0 + help + exit 0 fi