Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix install-eaf.py to also work on Fedora #841

Merged
merged 1 commit into from
Sep 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions install-eaf.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ def run_command(command, path=script_path, ensure_pass=True, get_result=False):

def install_sys_deps(distro: str, deps_list):
command = []
if distro == 'pacman':
command = ['sudo', 'pacman', '-Sy', '--noconfirm']
if which("dnf"):
command = ['sudo', 'dnf', '-y', 'install']
elif distro == 'apt':
command = ['sudo', 'apt', '-y', 'install']
elif which("dnf"):
command = ['sudo', 'dnf', '-y', 'install']
elif distro == 'pacman':
command = ['sudo', 'pacman', '-Sy', '--noconfirm']
elif which("pkg"):
command = ['doas', 'pkg', '-y', 'install']
elif which("zypper"):
Expand Down Expand Up @@ -183,14 +183,14 @@ def add_or_update_app(app: str, app_spec_dict):

def get_distro():
distro = ""
if which("pacman"):
if which("dnf"):
distro = "dnf"
elif which("apt"):
distro = "apt"
elif which("pacman"):
distro = "pacman"
if (not args.ignore_core_deps and not args.ignore_sys_deps and len(args.install) == 0) or args.install_core_deps:
run_command(['sudo', 'pacman', '-Sy', '--noconfirm'])
elif which("apt"):
distro = "apt"
elif which("dnf"):
distro = "dnf"
elif which("pkg"):
distro = "pkg"
elif which("zypper"):
Expand Down