Commit fcb7dbc2 authored by Vitaly Lipatov's avatar Vitaly Lipatov

distr_info: some checkbashisms fixes

parent b232f21e
...@@ -28,22 +28,22 @@ has() ...@@ -28,22 +28,22 @@ has()
# copied from epm-sh-functions # copied from epm-sh-functions
# print a path to the command if exists in $PATH # print a path to the command if exists in $PATH
if a= which which 2>/dev/null >/dev/null ; then if a='' which which 2>/dev/null >/dev/null ; then
# the best case if we have which command (other ways needs checking) # the best case if we have which command (other ways needs checking)
# TODO: don't use which at all, it is binary, not builtin shell command # TODO: don't use which at all, it is binary, not builtin shell command
print_command_path() print_command_path()
{ {
a= which -- "$1" 2>/dev/null a='' which -- "$1" 2>/dev/null
} }
elif a= type -a type 2>/dev/null >/dev/null ; then elif a='' type -a type 2>/dev/null >/dev/null ; then
print_command_path() print_command_path()
{ {
a= type -fpP -- "$1" 2>/dev/null a='' type -fpP -- "$1" 2>/dev/null
} }
else else
print_command_path() print_command_path()
{ {
a= type "$1" 2>/dev/null | sed -e 's|.* /|/|' a='' type "$1" 2>/dev/null | sed -e 's|.* /|/|'
} }
fi fi
...@@ -592,7 +592,7 @@ fill_distr_info ...@@ -592,7 +592,7 @@ fill_distr_info
get_uname() get_uname()
{ {
tolower $(uname $1) | tr -d " \t\r\n" tolower "$(uname $1)" | tr -d " \t\r\n"
} }
get_glibc_version() get_glibc_version()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment