diff --git a/better-pkg b/better-pkg index 4af5766..744245d 100644 --- a/better-pkg +++ b/better-pkg @@ -164,6 +164,7 @@ def setup_argparse(): install_parser.add_argument('-c', '--plugin', action='store_true', help='Install better-pkg plugin.') install_parser.add_argument('-s', '--sclassic', action='store_true', help='Use snap --classic.') install_parser.add_argument('-k', '--bcask', action='store_true', help='Use brew --cask.') + install_parser.add_argument('-l', '--layer', action='store_true', help='Use RPM-ostree or similar tools.') install_parser.add_argument('-b', '--file', action='store_true', help='Install package from file.') install_parser.add_argument('-y', action='store_true', help='Automatic yas to prompts.') install_parser.add_argument('-m', '--manager', choices=['apt', 'dnf', 'pacman', 'yay', 'paru', 'flatpak', 'snap', 'brew', 'pacstall', 'zypper', 'betterpkg'], help='Force install from specific package manager') @@ -3642,10 +3643,24 @@ def install(args): subprocess.run(["brew", "install", "--cask", package], check=True) print(f"{colors.BGreen}Successfully installed {package} with brew --cask.{colors.NC}") except subprocess.CalledProcessError as e: - print(f"{colors.BRed}Failed to install {package} with brew --caska: {e}{colors.NC}") + print(f"{colors.BRed}Failed to install {package} with brew --cask: {e}{colors.NC}") else: print(f"{colors.BRed}Brew is not installed on this system.{colors.NC}") return + + # Layering support + if args.layer: + for package in expanded_packages: + if shutil.which("rpm-ostree"): + print(f"{colors.BCyan}Layering {package} with RPM-ostree...{colors.NC}") + try: + subprocess.run(["rpm-ostree", "install", package], check=True) + print(f"{colors.BGreen}Successfully installed {package} with RPM-ostree.{colors.NC}") + except subprocess.CalledProcessError as e: + print(f"{colors.BRed}Failed to install {package} with RPM-ostree: {e}{colors.NC}") + else: + print(f"{colors.BRed}RPM-Ostree is not installed on this system.{colors.NC}") + return # Instalace z daného package manageru if getattr(args, "manager", None):