Update docs/get-clickhouse-docs.sh

Co-authored-by: Mikhail f. Shiryaev <felixoid@clickhouse.com>
This commit is contained in:
Alexander Tokmakov 2023-03-30 15:45:33 +03:00 committed by GitHub
parent 8b965ba895
commit 014db1fbaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,6 +36,8 @@ else
read -rp "Would you like to setup git hook for automatic update? (y|n): " set_git_hook read -rp "Would you like to setup git hook for automatic update? (y|n): " set_git_hook
fi fi
git clone "$git_url" "clickhouse-docs"
if [ "$set_git_hook" = "y" ]; then if [ "$set_git_hook" = "y" ]; then
hook_command="$(pwd)/pull-clickhouse-docs-hook.sh $UPDATE_PERIOD_HOURS ||:" hook_command="$(pwd)/pull-clickhouse-docs-hook.sh $UPDATE_PERIOD_HOURS ||:"
hook_file=$(realpath "$(pwd)/../.git/hooks/post-checkout") hook_file=$(realpath "$(pwd)/../.git/hooks/post-checkout")
@ -49,6 +51,4 @@ else
elif [ ! "$set_git_hook" = "n" ]; then elif [ ! "$set_git_hook" = "n" ]; then
echo "Expected 'y' or 'n', got '$set_git_hook', will not setup git hook" echo "Expected 'y' or 'n', got '$set_git_hook', will not setup git hook"
fi fi
git clone "$git_url" "clickhouse-docs"
fi fi