From 2673cc0c162682303819d9865422145c0d7a6623 Mon Sep 17 00:00:00 2001 From: the-sane <3657071+the-sane@users.noreply.github.com> Date: Tue, 10 Jun 2025 17:37:09 -0400 Subject: [PATCH] Simplify Nix check + fix grep call --- lug-helper.sh | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lug-helper.sh b/lug-helper.sh index 10f1b07..a1d1bdf 100755 --- a/lug-helper.sh +++ b/lug-helper.sh @@ -62,13 +62,6 @@ if [ ! -x "$(command -v cabextract)" ] || [ ! -x "$(command -v unzip)" ]; then exit 1 fi -# Checks for NixOS for NixOS specific options -if (grep '^NAME=NixOS' /etc/os-release -q 2> /dev/null ); then - is_nixos=1 -else - is_nixos=0 -fi - ######## Config ############################################################ wine_conf="winedir.conf" @@ -2693,7 +2686,7 @@ Usage: lug-helper fi # Detect if NixOS is being used and direct user to wiki -if [ "$is_nixos" -eq 1 ]; then +if (grep -q '^NAME=NixOS' /etc/os-release 2> /dev/null ); then message info "It looks like you're using NixOS\nPlease see our wiki for NixOS-specific configuration requirements:\n\n$lug_wiki_nixos" fi