Update app.py
Browse files
app.py
CHANGED
@@ -4,17 +4,14 @@ import os
|
|
4 |
def run_install_script():
|
5 |
script_path = "install.sh" # Path to the install.sh file
|
6 |
|
7 |
-
# Check if the file exists
|
8 |
if not os.path.exists(script_path):
|
9 |
print(f"Error: {script_path} not found.")
|
10 |
return
|
11 |
-
if not os.access(script_path, os.X_OK):
|
12 |
-
print(f"Error: {script_path} is not executable. Make it executable with 'chmod +x {script_path}'.")
|
13 |
-
return
|
14 |
|
15 |
try:
|
16 |
-
# Run the install.sh script
|
17 |
-
result = subprocess.run(["
|
18 |
print("Script Output:")
|
19 |
print(result.stdout)
|
20 |
except subprocess.CalledProcessError as e:
|
|
|
4 |
def run_install_script():
|
5 |
script_path = "install.sh" # Path to the install.sh file
|
6 |
|
7 |
+
# Check if the file exists
|
8 |
if not os.path.exists(script_path):
|
9 |
print(f"Error: {script_path} not found.")
|
10 |
return
|
|
|
|
|
|
|
11 |
|
12 |
try:
|
13 |
+
# Run the install.sh script with bash
|
14 |
+
result = subprocess.run(["bash", script_path], check=True, text=True, capture_output=True)
|
15 |
print("Script Output:")
|
16 |
print(result.stdout)
|
17 |
except subprocess.CalledProcessError as e:
|