From 721ee6f6f22aa061e571fca513ec084c520b2950 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 25 Aug 2024 19:28:31 +0200 Subject: [PATCH] mv --- spcd/main.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/spcd/main.sh b/spcd/main.sh index b55d80a..2834635 100644 --- a/spcd/main.sh +++ b/spcd/main.sh @@ -910,6 +910,18 @@ spcd_git_url() { fi } +# ╭───────────┬────╮ +# │ functions │ os │ +# ╰───────────┴────╯ + +spcd_grep_os() { + spcd_grep_os__variable="${1}" + [ -n "${spcd_grep_os__variable}" ] && + grep "^${spcd_grep_os__variable}=" "/etc/os-release" | + sed "s|^${spcd_grep_os__variable}=||" | + sed "s|^\"\(.*\)\"$|\1|" +} + # ╭───────────┬──────╮ # │ functions │ step │ # ╰───────────┴──────╯ @@ -958,14 +970,6 @@ spcd_echo() { fi } -spcd_grep_os() { - spcd_grep_os__variable="${1}" - [ -n "${spcd_grep_os__variable}" ] && - grep "^${spcd_grep_os__variable}=" "/etc/os-release" | - sed "s|^${spcd_grep_os__variable}=||" | - sed "s|^\"\(.*\)\"$|\1|" -} - spcd_install_package() { spcd_install_package__name="${1}" if [ -n "${spcd_install_package__name}" ]; then