Use "command" to get the bash_quote path.
Check if bash_quote is available.
This commit is contained in:
parent
c7129b7953
commit
2f67336b49
14
zshrc
14
zshrc
|
@ -300,12 +300,16 @@ alias ccal='var=$(cal); echo "${var/$(date +%-d)/$(echo -e "\033[1;31m$(date +%-
|
|||
function bonjour() {
|
||||
MIN_TIME=$(date +%M)
|
||||
MODULO_MIN=$(($MIN_TIME % 2))
|
||||
if [ $MODULO_MIN -eq 0 ]; then
|
||||
#echo Bonjour $USER, nous sommes le `date +"%A %e %B %Y"`, et il est : `date +"%H"` h `date +"%M"` | cowsay -f $(/bin/ls /usr/share/cowsay/cows -1 | head -n $(expr $$$(date +%s) % $(ls /usr/share/cowsay/cows | wc -w) + 1) | tail -n 1)
|
||||
/home/${USER}/bin/bash_quote | cowsay -f $(/bin/ls /usr/share/cowsay/cows -1 | head -n $(expr $$$(date +%s) % $(ls /usr/share/cowsay/cows | wc -w) + 1) | tail -n 1)
|
||||
if [ $(command -v bash_quote) ]; then
|
||||
if [ $MODULO_MIN -eq 0 ]; then
|
||||
#echo Bonjour $USER, nous sommes le `date +"%A %e %B %Y"`, et il est : `date +"%H"` h `date +"%M"` | cowsay -f $(/bin/ls /usr/share/cowsay/cows -1 | head -n $(expr $$$(date +%s) % $(ls /usr/share/cowsay/cows | wc -w) + 1) | tail -n 1)
|
||||
command bash_quote | cowsay -f $(/bin/ls /usr/share/cowsay/cows -1 | head -n $(expr $$$(date +%s) % $(ls /usr/share/cowsay/cows | wc -w) + 1) | tail -n 1)
|
||||
else
|
||||
#echo Bonjour $USER, nous sommes le `date +"%A %e %B %Y"`, et il est : `date +"%H"` h `date +"%M"` | ponythink
|
||||
command bash_quote | ponythink
|
||||
fi
|
||||
else
|
||||
#echo Bonjour $USER, nous sommes le `date +"%A %e %B %Y"`, et il est : `date +"%H"` h `date +"%M"` | ponythink
|
||||
/home/${USER}/bin/bash_quote | ponythink
|
||||
printf '%b' "${WHITEB}bonjour function${RESET}: One of the prerequesites is unavailable.\nFor bash_quote please see: https://git.101010.fr/dotfiles-gardouille/scripts/blob/master/bash_quote\n"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue