updated antidote from sheldon

This commit is contained in:
eeleater 2024-08-14 00:45:09 +02:00
parent 0ed285bef9
commit 863808c00d
5 changed files with 11 additions and 12 deletions

View file

@ -6,10 +6,10 @@ case "$1" in
echo "Daily Dad Joke: $joke"
;;
"bofh")
excuses_file="$HOME/.local/share/bofh"
num_lines=$(nl "$excuses_file" | tail -n 1 | awk '{print $1}')
file="$HOME/.local/share/bofh"
lines=$(nl "$file" | tail -n 1 | awk '{print $1}')
echo -n "Daily BOFH Excuse: "
awk 'NR=='$((1 + RANDOM % num_lines ))'{print;exit}' "$excuses_file"
awk 'NR=='$((1 + RANDOM % lines ))'{print;exit}' "$file"
;;
"hq")
file="$HOME/.local/share/hackerquotes/$2"

View file

@ -1,6 +1,6 @@
#!/bin/bash
newestVersion="$(curl -sL https://api.github.com/repos/JanDeDobbeleer/oh-my-posh/releases/latest | jq -r '.name' | cut -dv -f2)"
localVersion="$(oh-my-posh --version)"
newestVersion="$(curl -sL https://api.github.com/repos/JanDeDobbeleer/oh-my-posh/releases/latest | jq -r '.name')"
localVersion="v$(oh-my-posh --version)"
tmpFile="$(mktemp -u)"
test "$newestVersion" != "$localVersion" && {