mirror of https://github.com/CGAL/cgal
script to install hooks for clients
This commit is contained in:
parent
8f19c3d595
commit
bc23fc74d7
|
|
@ -3576,6 +3576,7 @@ Scripts/developer_scripts/cgal_build -text
|
|||
Scripts/developer_scripts/cgal_generate_cmake_script -text
|
||||
Scripts/developer_scripts/cgal_generate_cmake_script.cmake -text
|
||||
Scripts/developer_scripts/cgal_git_svn_clone -text
|
||||
Scripts/developer_scripts/cgal_git_update_hooks_for_client -text
|
||||
Scripts/developer_scripts/cgal_header_clean_up.py -text
|
||||
Scripts/developer_scripts/cgal_test_with_cmake eol=lf
|
||||
Scripts/developer_scripts/check_library_uses_no_gpl_files -text
|
||||
|
|
|
|||
|
|
@ -0,0 +1,35 @@
|
|||
if [ ! -e .git -o ! -e CMakeLists.txt ];
|
||||
then
|
||||
echo "Call $0 from root directory of the CGAL repository"
|
||||
exit
|
||||
fi
|
||||
|
||||
branch=$(git symbolic-ref HEAD)
|
||||
branch=${branch/refs\/heads\//}
|
||||
|
||||
if [ ! -e .git ];
|
||||
then
|
||||
echo "Call $0 from root directory of the CGAL repository"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$branch" != "master" ];
|
||||
then
|
||||
echo "Call $0 from branch 'master'"
|
||||
exit
|
||||
fi
|
||||
|
||||
echo -n "Fetching from origin ... "
|
||||
git fetch
|
||||
echo "done"
|
||||
|
||||
echo "Updating hooks ... "
|
||||
|
||||
cd .git/hooks
|
||||
if [ ! -e .git ];
|
||||
then
|
||||
git init
|
||||
fi
|
||||
git pull .. origin/hooks-for-clients
|
||||
echo "Hooks updated."
|
||||
cd ../..
|
||||
Loading…
Reference in New Issue