generate-*-snapshot: do not fail if PRE_SOURCE_HOOK is unset

While at it adjust coding style