mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-11-30 16:03:05 +00:00
Merge pull request #6577 from ReinUsesLisp/precommit
cmake: Only copy pre-commit hook if .git directory exists
This commit is contained in:
commit
7059bb2bf8
|
@ -47,9 +47,10 @@ if (NOT IS_MULTI_CONFIG AND NOT CMAKE_BUILD_TYPE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(EXISTS ${PROJECT_SOURCE_DIR}/hooks/pre-commit AND NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/hooks/pre-commit)
|
if(EXISTS ${PROJECT_SOURCE_DIR}/hooks/pre-commit AND NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/hooks/pre-commit)
|
||||||
message(STATUS "Copying pre-commit hook")
|
if (EXISTS ${PROJECT_SOURCE_DIR}/.git/)
|
||||||
file(COPY hooks/pre-commit
|
message(STATUS "Copying pre-commit hook")
|
||||||
DESTINATION ${PROJECT_SOURCE_DIR}/.git/hooks)
|
file(COPY hooks/pre-commit DESTINATION ${PROJECT_SOURCE_DIR}/.git/hooks)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Sanity check : Check that all submodules are present
|
# Sanity check : Check that all submodules are present
|
||||||
|
|
Loading…
Reference in a new issue