cd_grep_os
This commit is contained in:
parent
add6886d09
commit
3abf55f721
1 changed files with 7 additions and 2 deletions
9
cd.sh
9
cd.sh
|
@ -324,8 +324,13 @@ local variable="${1}"
|
|||
exit 2
|
||||
}
|
||||
|
||||
cd_get_string () {
|
||||
[ "${1}" ] && echo "${1}" | cut -d "=" -f 2 | cut -d "\"" -f 2
|
||||
cd_grep_os () {
|
||||
local variable="${1}"
|
||||
if [ "${variable}" ] ; then
|
||||
grep "^${variable}=" "/etc/os-release" \
|
||||
| sed "s|^${variable}||" \
|
||||
| sed "s|^\"\(.*\)\"$|\1|"
|
||||
fi
|
||||
}
|
||||
|
||||
cd_install_package () {
|
||||
|
|
Loading…
Reference in a new issue