forked from biomayak/fwstorebot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·35 lines (25 loc) · 859 Bytes
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
# Script for setting up a Yarn-based project with user prompts
echo "Welcome to the project setup script!"
# Prompt the user for MongoDB URI
read -p "Enter MongoDB URI: " mongodb_uri
# Prompt the user for Bot Token
read -p "Enter Bot Token: " bot_token
# Prompt the user for Database Name
read -p "Enter Database Name: " db_name
# Install Yarn (if not already installed)
if ! command -v yarn &> /dev/null; then
echo "Yarn not found. Installing Yarn..."
npm install -g yarn
fi
# Install project dependencies
echo "Installing project dependencies..."
yarn install
# Create environment file
echo "Creating .env file..."
echo "MONGODB_URI=$mongodb_uri" >> .env
echo "BOT_TOKEN=$bot_token" >> .env
echo "DB_NAME=$db_name" >> .env
# Additional setup tasks can be added here
# Display completion message
echo "Setup completed successfully!"