make posix compliant

This commit is contained in:
propruhh 2021-02-28 13:04:46 -06:00
parent f679e105a3
commit df18da99e3

View file

@ -2,23 +2,23 @@
tmpfile="$(mktemp nekofetchXXXXXXXX)"
debug=false
debug=true
case "$1" in
"--nsfw"|"nsfw"|"-n"|"n")
if [ "$debug" == true ]; then
if [ "$debug" = true ]; then
echo "Getting a nsfw image"
fi
imgurl="https://nekos.life/api/v2/img/cum_jpg"
;;
"--sfw"|"sfw"|"-s"|"s")
if [ "$debug" == true ]; then
if [ "$debug" = true ]; then
echo "Getting a sfw image"
fi
imgurl="https://nekos.life/api/v2/img/neko"
;;
*)
if [ "$debug" == true ]; then
if [ "$debug" = true ]; then
echo "Could not interpret as either sfw or nsfw. Defaulting to sfw."
fi
imgurl="https://nekos.life/api/v2/img/neko"
@ -26,7 +26,7 @@ case "$1" in
esac
echo "$2" | grep -qE '^[0-9]+$' && height="$2" || height="$(($(stty size | awk '{print $1}') - 5))"
if [ "$debug" == true ]; then
if [ "$debug" = true ]; then
echo "Using height $height"
fi