fix update check

This commit is contained in:
Ray Elliott 2022-03-22 15:43:36 +00:00
parent fa852885e5
commit 0a35f3194f
1 changed files with 4 additions and 1 deletions

5
bashrc
View File

@ -29,7 +29,7 @@ export NVM_DIR="$HOME/.nvm"
eval "$(lua $HOME/.z.lua/z.lua --init bash enhanced once echo)"
_mem_available=$(awk '/MemAvailable/ { printf "%.1f \n", $2/1024/1024 }' /proc/meminfo)
_updates_available="$(cat $HOME/.checkupdates)"
_updates_available="$(wc -l $HOME/.checkupdates | cut -d' ' -f1)"
[ -z $_updates_available ] && _updates_available="0"
echo "Remember your aliases:"
@ -39,6 +39,9 @@ echo " mc newsh smartresize"
echo " b1 kvm mike p1 pve"
echo ""
echo "Remember your commands:"
echo " vimv 'flameshot gui'"
if [ ${_mem_available%.*} -lt 5 ] ; then
echo -n "Memory available: "
[ ${_mem_available%.*} -lt 3 ] && echo -ne "\033[0;31m"