Fixes for archlinux
This commit is contained in:
parent
1700734c2a
commit
04ddeb761e
6 changed files with 55 additions and 11 deletions
|
|
@ -11,6 +11,7 @@ import pwd
|
|||
from subprocess import call
|
||||
from pathlib import Path
|
||||
from time import sleep
|
||||
import distro
|
||||
|
||||
parser = argparse.ArgumentParser(description='A script for install leviathan user')
|
||||
|
||||
|
|
@ -191,6 +192,16 @@ if check_url.match(args.url_stats):
|
|||
print('{"error": 0, "status": 0, "progress": 100, "no_progress":0, "message": "Tools installed..."}')
|
||||
|
||||
sleep(1)
|
||||
|
||||
linux_distro=distro.id()
|
||||
|
||||
# sudo su - %s -s /bin/bash -c 'mkdir -p %s'
|
||||
|
||||
if linux_distro=='arch':
|
||||
print('Add utilities for archlinux distro...')
|
||||
if call("sudo su - %s -s /bin/bash -c 'sudo pacman -S --noconfirm --needed git base-devel && git clone https://aur.archlinux.org/yay.git && cd yay && makepkg -si --noconfirm --needed'" % args.user, shell=True) > 0:
|
||||
print('Error, cannot add utilities for archlinux')
|
||||
exit(1)
|
||||
|
||||
else:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue