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