|
|
@@ -7,7 +7,7 @@ activate_venv() {
|
|
|
source env/bin/activate || { echo "Failed to activate virtual environment"; exit 1; }
|
|
|
}
|
|
|
|
|
|
-install_module() {
|
|
|
+update_modules() {
|
|
|
pip install --upgrade pip || { echo "Failed to upgrade pip"; exit 1; } # Upgrade pip
|
|
|
pip install -e . || { echo "Failed to install/upgrade module"; exit 1; } # Install/upgrade modules
|
|
|
}
|
|
|
@@ -18,10 +18,10 @@ update_config() {
|
|
|
read -p "Enter the external URL your OwnchatBot uses, with \"https://\": " OCB_URL
|
|
|
|
|
|
if [[ -n "$OCB_URL" ]]; then # Check if OCB_URL is not empty
|
|
|
- echo "OCB_URL = '$OCB_URL'" >> instance/config.py # Append the line to config.py
|
|
|
+ echo "" >> instance/config.py # Append an empty line so it formats correctly
|
|
|
+ echo "OCB_URL = '$OCB_URL'" >> instance/config.py # Append the new line
|
|
|
echo "Set OCB_URL successfully."
|
|
|
- # Optionally create a backup of the original config.py
|
|
|
- cp instance/config.py "$bak_file" # Replace this with your backup file variable
|
|
|
+ cp instance/config.py "$bak_file"
|
|
|
rm "$bak_file" # Remove the .bak file if the update was successful
|
|
|
else
|
|
|
echo "Failed to set OCB_URL. Please provide a valid URL."
|
|
|
@@ -29,6 +29,9 @@ update_config() {
|
|
|
fi
|
|
|
}
|
|
|
|
|
|
+# activate_venv
|
|
|
+# update_modules
|
|
|
update_config
|
|
|
+# deactivate
|
|
|
|
|
|
echo -e "Your OwnchatBot configuration has been upgraded. Happy streaming!"
|