Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,7 +7,7 @@ import subprocess
|
|
| 7 |
st.title("Try")
|
| 8 |
st.text("running commondsd .....")
|
| 9 |
# subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
|
| 10 |
-
cmd1 = subprocess.run("
|
| 11 |
if cmd1.returncode == 0:
|
| 12 |
print("Command output:")
|
| 13 |
print(cmd1.stdout)
|
|
@@ -16,7 +16,7 @@ else:
|
|
| 16 |
print("Error executing command:")
|
| 17 |
print(cmd1.stderr)
|
| 18 |
sleep(5)
|
| 19 |
-
cmd2 = subprocess.run("
|
| 20 |
if cmd2.returncode == 0:
|
| 21 |
print("Command output:")
|
| 22 |
print(cmd2.stdout)
|
|
@@ -34,7 +34,7 @@ else:
|
|
| 34 |
print("Error executing command:")
|
| 35 |
print(cmd3.stderr)
|
| 36 |
sleep(5)
|
| 37 |
-
cmd4 = subprocess.run("
|
| 38 |
if cmd4.returncode == 0:
|
| 39 |
print("Command output:")
|
| 40 |
print(cmd4.stdout)
|
|
@@ -43,7 +43,7 @@ else:
|
|
| 43 |
print("Error executing command:")
|
| 44 |
print(cmd4.stderr)
|
| 45 |
sleep(5)
|
| 46 |
-
cmd5 = subprocess.run("
|
| 47 |
if cmd5.returncode == 0:
|
| 48 |
print("Command output:")
|
| 49 |
print(cmd5.stdout)
|
|
|
|
| 7 |
st.title("Try")
|
| 8 |
st.text("running commondsd .....")
|
| 9 |
# subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
|
| 10 |
+
cmd1 = subprocess.run("apt update", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
|
| 11 |
if cmd1.returncode == 0:
|
| 12 |
print("Command output:")
|
| 13 |
print(cmd1.stdout)
|
|
|
|
| 16 |
print("Error executing command:")
|
| 17 |
print(cmd1.stderr)
|
| 18 |
sleep(5)
|
| 19 |
+
cmd2 = subprocess.run("apt install wget apt-transport-https", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
|
| 20 |
if cmd2.returncode == 0:
|
| 21 |
print("Command output:")
|
| 22 |
print(cmd2.stdout)
|
|
|
|
| 34 |
print("Error executing command:")
|
| 35 |
print(cmd3.stderr)
|
| 36 |
sleep(5)
|
| 37 |
+
cmd4 = subprocess.run("dpkg -i google-chrome-stable_current_amd64.deb", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
|
| 38 |
if cmd4.returncode == 0:
|
| 39 |
print("Command output:")
|
| 40 |
print(cmd4.stdout)
|
|
|
|
| 43 |
print("Error executing command:")
|
| 44 |
print(cmd4.stderr)
|
| 45 |
sleep(5)
|
| 46 |
+
cmd5 = subprocess.run("apt --fix-broken install", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
|
| 47 |
if cmd5.returncode == 0:
|
| 48 |
print("Command output:")
|
| 49 |
print(cmd5.stdout)
|