File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- function hzline() {
4- printf ' %*s\n' " ${COLUMNS:- $(tput cols)} " ' ' | tr ' ' - ;
5- }
3+ # horizontal line
4+ function hzline() { printf ' %*s\n' " ${COLUMNS:- $(tput cols)} " ' ' | tr ' ' - ; }
65
76# Check if Docker is installed
87if ! [ -x " $( command -v docker) " ]; then
@@ -18,6 +17,19 @@ echo "::: Source code & repo: https://github.com/FlyingFathead/TelegramBot-OpenA
1817hzline &&
1918echo
2019
20+ # Check if .env file already exists and prompt the user
21+ if [ -f .env ]; then
22+ echo " Warning: A .env file already exists in this directory."
23+ while true ; do
24+ read -p " Do you want to overwrite the existing .env file? (y/n): " yn
25+ case $yn in
26+ [Yy]* ) break ;;
27+ [Nn]* ) echo " Exiting setup without overwriting .env file." ; exit 0;;
28+ * ) echo " Please answer yes or no." ;;
29+ esac
30+ done
31+ fi
32+
2133# Function to check for empty or invalid inputs for required keys
2234validate_input () {
2335 if [[ -z " $1 " || ${# 1} -lt 10 ]]; then
You can’t perform that action at this time.
0 commit comments