generated from CDCgov/template
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c7cb2c0
commit a0c56ad
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
# Define the content of the .env file | ||
env_content="ENV=local\nKEY_VAULT-NAME=ti-key-vault-name\nREPORT_STREAM_URL_PREFIX=http://localhost:7071" | ||
|
||
# Get directory of script file | ||
script_dir="$(dirname "$0")" | ||
|
||
# Path to the resource folder | ||
folder_path="$script_dir/shared/src/main/resources" | ||
|
||
# Check if folder exists, and create if if not | ||
if [ ! -d "$folder_path" ]; then | ||
mkdir -p "$folder_path" || { echo "Error creating directory."; exit 1; } | ||
fi | ||
|
||
# Create or overwrite the .env file | ||
echo -e "$env_content" > "$folder_path/.env" || { echo "Error creating .env file."; exit 1; } | ||
|
||
# Display comments | ||
echo "The .env file has been created in $folder_path with the following content: " | ||
echo -e "$env_content" |