2023-03-09 15:19:12 +00:00
|
|
|
#!/bin/bash
|
2023-08-21 12:42:41 +00:00
|
|
|
cp ./.env.example ./.env
|
2023-03-09 15:19:12 +00:00
|
|
|
|
2023-05-25 04:54:20 +00:00
|
|
|
# Export for tr error in mac
|
2023-04-10 12:13:19 +00:00
|
|
|
export LC_ALL=C
|
|
|
|
export LC_CTYPE=C
|
2023-05-25 04:54:20 +00:00
|
|
|
|
2023-05-25 06:54:03 +00:00
|
|
|
|
2023-05-25 04:54:20 +00:00
|
|
|
# Generate the NEXT_PUBLIC_API_BASE_URL with given IP
|
2023-05-26 05:39:59 +00:00
|
|
|
echo -e "\nNEXT_PUBLIC_API_BASE_URL=$1" >> ./.env
|
2023-05-25 04:54:20 +00:00
|
|
|
|
|
|
|
# Generate the SECRET_KEY that will be used by django
|
2023-05-29 06:41:16 +00:00
|
|
|
echo -e "SECRET_KEY=\"$(tr -dc 'a-z0-9' < /dev/urandom | head -c50)\"" >> ./.env
|
2023-05-25 04:54:20 +00:00
|
|
|
|
|
|
|
# WEB_URL for email redirection and image saving
|
2023-05-25 06:54:03 +00:00
|
|
|
echo -e "WEB_URL=$1" >> ./.env
|
2023-08-18 06:17:58 +00:00
|
|
|
|
|
|
|
# Generate Prompt for taking tiptap auth key
|
|
|
|
echo -e "\n\e[1;38m Instructions for generating TipTap Pro Extensions Auth Token \e[0m \n"
|
|
|
|
|
|
|
|
echo -e "\e[1;38m 1. Head over to TipTap cloud's Pro Extensions Page, https://collab.tiptap.dev/pro-extensions \e[0m"
|
|
|
|
echo -e "\e[1;38m 2. Copy the token given to you under the first paragraph, after 'Here it is' \e[0m \n"
|
|
|
|
|
|
|
|
read -p $'\e[1;32m Please Enter Your TipTap Pro Extensions Authentication Token: \e[0m \e[1;36m' authToken
|
|
|
|
|
|
|
|
|
|
|
|
echo "@tiptap-pro:registry=https://registry.tiptap.dev/
|
|
|
|
//registry.tiptap.dev/:_authToken=${authToken}" > .npmrc
|
|
|
|
|