diff --git a/simplecheck b/simplecheck index 5a395fc..54568c7 100755 --- a/simplecheck +++ b/simplecheck @@ -5,19 +5,19 @@ simplesearchlocal="./simplesearch" simplesearchglobal="/usr/bin/simplesearch" if [ ! -f "$pacmaninstalled" ]; then - printf "\n%s\n" "You are not using ArchLinux (pacman not found in $pacmaninstalled)" + printf "\e[1;31m%-6s\e[m%s\n" "You are not using ArchLinux (pacman not found in $pacmaninstalled)" exit elif [ ! -f "$simplesearchlocal" ] && [ ! -f "$simplesearchglobal" ]; then - printf "\n%s\n" "simplesearch not found, make sure that you have the simplesearch script in the current folder or in /usr/bin/simplesearch" + printf "\e[1;31m%-6s\e[m%s\n" "simplesearch not found, make sure that you have the simplesearch script in the current folder or in /usr/bin/simplesearch" exit else if [ -f "$simplesearchlocal" ]; then - printf "\n%s\n%s\n" "The following packages are availables for update, you can update one to one using: simpleaur package_name" + printf "\n\e[1;32m%-6s\e[m\n%s\n" "The following packages are availables for update, you can update one to one using: simpleaur package_name" for aurpkg in $(pacman -Qmq |grep -v 'git'); do ./simplesearch "$aurpkg" |grep "installed:"; done exit elif [ -f "$simplesearchglobal" ]; then - printf "\n%s\n%s\n" "The following packages are availables for update, you can update one to one using: simpleaur package_name" + printf "\n\e[1;32m%-6s\e[m\n%s\n" "The following packages are availables for update, you can update one to one using: simpleaur package_name" for aurpkg in $(pacman -Qmq |grep -v 'git'); do simplesearch "$aurpkg" |grep "installed:"; done exit fi diff --git a/simplesearch b/simplesearch index ccdf035..d59b6a9 100755 --- a/simplesearch +++ b/simplesearch @@ -3,9 +3,9 @@ cowerinstalled="/usr/bin/cower" spackage=( "$@" ) if [ ! -f "$cowerinstalled" ]; then - printf "\n%s\n" "Please, install cower first running in your terminal: gpg --recv-keys 1EB2638FF56C0C53 && simpleaur cower" + printf "\e[1;31m%-6s\e[m%s\n" "Please, install cower first running in your terminal: gpg --recv-keys 1EB2638FF56C0C53 && simpleaur cower" else - if [ "${#spackage[@]}" -ge 0 ]; then - cower -sc "${spackage[@]}" - fi + if [ "${#spackage[@]}" -ge 0 ]; then + cower -sc "${spackage[@]}" + fi fi