modify: whitespace and line length cleanups.

This should contain no functional modifications.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
This commit is contained in:
Denis 'GNUtoo' Carikli 2023-11-27 00:27:27 +01:00 committed by Adrien 'neox' Bourmault
parent ec100eee05
commit 9c5a04ba47
Signed by: neox
GPG Key ID: 2974E1D5F25DFCC8
1 changed files with 28 additions and 27 deletions

55
modify
View File

@ -70,33 +70,34 @@ mode="${1}"
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
"${modify}"/"${mode}"/"${option}" $@
done
;;
*)
if [ -d "${modify}"/"${mode}"/ ]; then
if [ -f "${modify}"/"${mode}"/"${option}" ]; then
"${modify}"/"${mode}"/"${option}" $@
else
help
die "Invalid option for '${mode}'. See './modify ${mode} list'."
fi
else
help
die "Invalid mode '${mode}'. See './modify 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
"${modify}"/"${mode}"/"${option}" $@
done
;;
*)
if [ -d "${modify}"/"${mode}"/ ]; then
if [ -f "${modify}"/"${mode}"/"${option}" ]; then
"${modify}"/"${mode}"/"${option}" $@
else
help
die "Invalid option for '${mode}'." \
" See './modify ${mode} list'."
fi
else
help
die "Invalid mode '${mode}'. See './modify help'."
fi
esac
else
help
exit 0
help
exit 0
fi