thrown through shellcheck

This commit is contained in:
konomo 2021-10-19 20:34:59 +00:00
parent c0caf24582
commit 014c74fb11
2 changed files with 5 additions and 4 deletions

View File

@ -10,3 +10,4 @@ copy it into your gemini directory and make it executable of course
## Changelog
* 2021-10-18: thrown together in an hour
* 2021-10-19: thrown through shellcheck

View File

@ -1,10 +1,10 @@
#!/usr/bin/env bash
if [ -z $QUERY_STRING ]; then
if [[ -z "$QUERY_STRING" ]]; then
printf "10 Please enter your name!\r\n"
fi
name=$QUERY_STRING
printf "20 text/gemini\r\n"
printf "# Pronoun Dressing Room for ${name}\n"
printf "# Pronoun Dressing Room for %s\n" "$name"
sentences=("I really enjoy spending time with OBJECTIVE." "NAME is really cool, I like OBJECTIVE." "POSESSIVEDT accent is nice." "That belongs to OBJECTIVE." "NAME did so well, SUBJECTIVE MSHAS every reason to be proud of REFLEXIVE.")
@ -17,7 +17,7 @@ pr_ref=("himself" "herself" "themselves" "xemself")
cnt=0
for i in "${pr_sub[@]}"; do
printf "${i}:\n---\n"
printf "%s:\n---\n" "$i"
for j in "${sentences[@]}"; do
cursent="${j}"
@ -36,7 +36,7 @@ for i in "${pr_sub[@]}"; do
cursent="${cursent//POSESSIVEDT/"${pr_psd[${cnt}]}"}"
cursent="${cursent//POSESSIVE/"${pr_pos[${cnt}]}"}"
cursent="${cursent//REFLEXIVE/"${pr_ref[${cnt}]}"}"
printf "${cursent^}\n"
printf "%s\n" "${cursent^}"
done
printf "\n"