Skip to content

Commit

Permalink
check package installed function bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Gictorbit committed Dec 30, 2020
1 parent 43145d5 commit c78925c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/sharedFuncs.sh
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit c78925c

Please sign in to comment.