mirror of
https://github.com/edu4rdshl/simpleaur.git
synced 2026-07-17 23:24:46 +00:00
Added color support in output
This commit is contained in:
parent
3843b62fb4
commit
5dc0c6b6ae
2 changed files with 8 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue