check package installed function bug fixed
This commit is contained in:
parent
43145d51aa
commit
c78925c974
|
@ -1,7 +1,8 @@
|
|||
|
||||
function package_installed() {
|
||||
local which=$(which $1 2>/dev/null)
|
||||
if [ "$which" == "/usr/bin/$1" ];then
|
||||
which $1 &> /dev/null
|
||||
local pkginstalled="$?"
|
||||
if [ "$pkginstalled" -eq 0 ];then
|
||||
show_message "package\033[1;36m $1\e[0m is installed..."
|
||||
else
|
||||
warning "package\033[1;33m $1\e[0m is not installed.\nplease make sure it's already installed"
|
||||
|
|
Loading…
Reference in New Issue