1
0
mirror of https://github.com/eoli3n/dotfiles synced 2024-11-22 23:12:32 +01:00

removed cower dependency

This commit is contained in:
eoli3n 2019-08-18 12:52:40 +02:00
parent 696fb36cb9
commit 72d186bddc
2 changed files with 11 additions and 9 deletions

@ -7,8 +7,3 @@
- jshon
- pygmentize
become: True
- name: Install cower on [Archlinux]
shell: curl -o PKGBUILD https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=cower; makepkg PKGBUILD --skippgpcheck --install --needed --noconfirm
args:
creates: /usr/bin/cower

@ -1,9 +1,16 @@
#!/bin/bash
pac=$(checkupdates | wc -l)
aur=$(cower -u | wc -l)
pac=$(checkupdates 2>/dev/null | wc -l)
aur=$(cower -u 2>/dev/null | wc -l)
kernel=$(vercmp "$(uname -r | cut -f-2 -d-)" "$(pacman --nodeps -Sp --print-format %v linux)")
check=$((pac + aur))
if [[ "$check" != "0" ]]
if [[ $pac -eq "0" ]] && [[ $aur -eq "0" ]] || [[ ! $pac =~ [0-9]+ ]] || [[ ! $aur =~ [0-9]+ ]]
then
exit 0
fi
if [[ $kernel == "0" ]]
then
echo "$pac %{F#5b5b5b}%{F-} $aur"
else
echo "$pac %{F#ff5c57}%{F-} $aur"
fi