fix old distro map terms being referenced

This commit is contained in:
askiiart 2024-11-07 15:37:43 -06:00
parent 463cdf64fc
commit 321f9d9399
Signed by untrusted user who does not match committer: askiiart
GPG key ID: EA85979611654C30

24
blend
View file

@ -248,12 +248,12 @@ def core_run_container(cmd):
def core_install_pkg(pkg): def core_install_pkg(pkg):
if args.distro == 'fedora-rawhide': if args.distro.startswith('fedora-'):
if args.noconfirm == True: if args.noconfirm == True:
core_run_container(f'sudo dnf -y install {pkg}') core_run_container(f'sudo dnf -y install {pkg}')
else: else:
core_run_container(f'sudo dnf install {pkg}') core_run_container(f'sudo dnf install {pkg}')
elif args.distro == 'arch': elif args.distro == 'arch-linux':
if core_get_retcode('[ -f /usr/bin/yay ]') != 0: if core_get_retcode('[ -f /usr/bin/yay ]') != 0:
core_run_container('sudo pacman -Sy') core_run_container('sudo pacman -Sy')
core_run_container( core_run_container(
@ -274,12 +274,12 @@ def core_install_pkg(pkg):
def core_remove_pkg(pkg): def core_remove_pkg(pkg):
if args.distro == 'fedora-rawhide': if args.distro.startswith('fedora-'):
if args.noconfirm == True: if args.noconfirm == True:
core_run_container(f'sudo dnf -y remove {pkg}') core_run_container(f'sudo dnf -y remove {pkg}')
else: else:
core_run_container(f'sudo dnf remove {pkg}') core_run_container(f'sudo dnf remove {pkg}')
elif args.distro == 'arch': elif args.distro == 'arch-linux':
if args.noconfirm == True: if args.noconfirm == True:
core_run_container(f'sudo pacman --noconfirm -Rcns {pkg}') core_run_container(f'sudo pacman --noconfirm -Rcns {pkg}')
else: else:
@ -293,9 +293,9 @@ def core_remove_pkg(pkg):
def core_search_pkg(pkg): def core_search_pkg(pkg):
if args.distro == 'fedora-rawhide': if args.distro.startswith('fedora-'):
core_run_container(f'dnf search {pkg}') core_run_container(f'dnf search {pkg}')
elif args.distro == 'arch': elif args.distro == 'arch-linux':
core_run_container(f'yay -Sy') core_run_container(f'yay -Sy')
core_run_container(f'yay {pkg}') core_run_container(f'yay {pkg}')
elif args.distro.startswith('ubuntu-'): elif args.distro.startswith('ubuntu-'):
@ -304,9 +304,9 @@ def core_search_pkg(pkg):
def core_show_pkg(pkg): def core_show_pkg(pkg):
if args.distro == 'fedora-rawhide': if args.distro.startswith('fedora-'):
core_run_container(f'dnf info {pkg}') core_run_container(f'dnf info {pkg}')
elif args.distro == 'arch': elif args.distro == 'arch-linux':
core_run_container(f'yay -Sy') core_run_container(f'yay -Sy')
core_run_container(f'yay -Si {pkg}') core_run_container(f'yay -Si {pkg}')
elif args.distro.startswith('ubuntu-'): elif args.distro.startswith('ubuntu-'):
@ -358,21 +358,21 @@ def show_blend():
def sync_blends(): def sync_blends():
if args.distro == 'fedora-rawhide': if args.distro.startswith('fedora-'):
core_run_container(f'dnf makecache') core_run_container(f'dnf makecache')
elif args.distro == 'arch': elif args.distro == 'arch-linux':
core_run_container(f'yay -Syy') core_run_container(f'yay -Syy')
elif args.distro.startswith('ubuntu-'): elif args.distro.startswith('ubuntu-'):
core_run_container(f'sudo apt-get update') core_run_container(f'sudo apt-get update')
def update_blends(): def update_blends():
if args.distro == 'fedora-rawhide': if args.distro.startswith('fedora-'):
if args.noconfirm == True: if args.noconfirm == True:
core_run_container(f'sudo dnf -y upgrade') core_run_container(f'sudo dnf -y upgrade')
else: else:
core_run_container(f'sudo dnf upgrade') core_run_container(f'sudo dnf upgrade')
elif args.distro == 'arch': elif args.distro == 'arch-linux':
if args.noconfirm == True: if args.noconfirm == True:
core_run_container(f'yay --noconfirm') core_run_container(f'yay --noconfirm')
else: else: