mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Give users option of overwriting
This commit is contained in:
parent
37570f10ea
commit
4cc614ce7a
@ -60,12 +60,21 @@ fi
|
||||
clickhouse_download_filename_prefix="clickhouse"
|
||||
clickhouse="$clickhouse_download_filename_prefix"
|
||||
|
||||
i=0
|
||||
while [ -f "$clickhouse" ]
|
||||
do
|
||||
if [ -f "$clickhouse" ]
|
||||
then
|
||||
read -p "ClickHouse binary ${clickhouse} already exists. Overwrite? [y/N] " answer
|
||||
if [ "$answer" = "y" -o "$answer" = "Y" ]
|
||||
then
|
||||
rm -f "$clickhouse"
|
||||
else
|
||||
i=0
|
||||
while [ -f "$clickhouse" ]
|
||||
do
|
||||
clickhouse="${clickhouse_download_filename_prefix}.${i}"
|
||||
i=$(($i+1))
|
||||
done
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
URL="https://builds.clickhouse.com/master/${DIR}/clickhouse"
|
||||
echo
|
||||
|
Loading…
Reference in New Issue
Block a user