replace nested if/else/if with if/elif

This commit is contained in:
Jérémy Lecour 2019-03-10 22:32:49 +01:00
parent 7833c9c3ee
commit 5f06aec803

View file

@ -427,10 +427,8 @@ if [ "${INTERACTIVE}" = "1" ]; then
esac
done
fi
else
if [ "${HOOK_COMMIT}" = "1" ]; then
hook_commit
fi
elif [ "${HOOK_COMMIT}" = "1" ]; then
hook_commit
fi
# Database hook
@ -463,10 +461,8 @@ if [ "${INTERACTIVE}" = "1" ]; then
;;
esac
done
else
if [ "${HOOK_DB}" = "1" ]; then
hook_db
fi
elif [ "${HOOK_DB}" = "1" ]; then
hook_db
fi
# Mail hook
@ -506,10 +502,8 @@ if [ "${INTERACTIVE}" = "1" ]; then
;;
esac
done
else
if [ "${HOOK_MAIL}" = "1" ]; then
hook_mail
fi
elif [ "${HOOK_MAIL}" = "1" ]; then
hook_mail
fi
exit 0