Fixes in updates

This commit is contained in:
Antonio de la Rosa 2022-02-11 00:12:11 +01:00
parent 25d98341ac
commit 7a3fe536a8
7 changed files with 94 additions and 9 deletions

View file

@ -0,0 +1,24 @@
#!/usr/bin/python3 -u
# A script for install pzoo user
from subprocess import call
from time import sleep
import distro
linux_distro=distro.id()
print('{"error": 0, "status": 0, "progress": 0, "no_progress":0, "message": "Installing git..."}')
sleep(1)
if linux_distro=='arch':
if call("sudo pacman -S --noconfirm git", shell=True) > 0:
print('Error, cannot install git...')
exit(1)
elif linux_distro=='debian':
if call('sudo DEBIAN_FRONTEND="noninteractive" apt-get install -y git', shell=True) > 0:
print('Error, cannot install git...')
exit(1)