Refactor code

This commit is contained in:
jmjl 2023-08-01 14:58:02 +00:00
parent 040483cbcc
commit f762671c76

View file

@ -29,6 +29,7 @@ while read -r i;do
c="$(r1b <&3)"
user="$(echo "${i}"|cut -d\ -f2)"
email="$(echo "${i}"|cut -d\ -f3)"
key="$(echo "${i}"|cut -d\ -f4|tr -d \")"
n="${user} (${email})"
case "${c}" in
(i)echo "skipping!";continue;;
@ -37,10 +38,10 @@ while read -r i;do
(A)
echo "accepting ${n}, please type your message and press Ctrl-D"
COMMENT="$(cat <&3)"
eval "${i} \"${COMMENT}\"";;
/opt/tools/bin/makeuser "${user}" "${email}" "${key}" "${COMMENT}";;
(a)
echo "accepting ${n}"
eval "${i}";;
/opt/tools/bin/makeuser "${user}" "${email}" "${key}";;
(c)
echo "commenting ${n}";;
esac