From 855ac59ed34f05882e2c265047b7d02e9ded6744 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 31 Aug 2024 01:03:42 +0200 Subject: [PATCH] os/grep --- spcd/bootstrap.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index d3e89a1..ccea737 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -221,10 +221,10 @@ spcd_openssl_x509() { # ╰───────────┴────╯ spcd_os_grep() { - spcd_os_grep__variable="${1}" - [ -n "${spcd_os_grep__variable}" ] && - grep "^${spcd_os_grep__variable}=" "/etc/os-release" | - sed "s|^${spcd_os_grep__variable}=||" | + local variable="${1}" + [ -n "${variable}" ] && + grep "^${variable}=" "/etc/os-release" | + sed "s|^${variable}=||" | sed "s|^\"\(.*\)\"$|\1|" }