Skip to content

Commit

Permalink
Merge pull request #101 from buzztaiki/unkomorimori_cowfile
Browse files Browse the repository at this point in the history
ArchLinux で unko.say と unko.think が文字化けしていたのを修正
  • Loading branch information
greymd authored Apr 11, 2022
2 parents d1c1118 + 5f96567 commit 4861815
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
13 changes: 5 additions & 8 deletions bin/unko.say
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,10 @@ readonly THIS_DIR
LIB_DIR="${THIS_DIR}/../lib/super_unko"
readonly LIB_DIR

case ${OSTYPE} in
darwin*)
COW_FILE="${LIB_DIR}/unko_mb.cow"
;;
*)
COW_FILE="${LIB_DIR}/unko.cow"
;;
esac
COW_FILE="${LIB_DIR}/unko_mb.cow"
if ! (cowsay -f "${COW_FILE}" 'うんこ' | grep -qe 'うんこ' &&
cowsay -f "${COW_FILE}" 'もりもり' | grep -qe '💩'); then
COW_FILE="${LIB_DIR}/unko.cow"
fi

cowsay -f "${COW_FILE}" "$@"
13 changes: 5 additions & 8 deletions bin/unko.think
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,10 @@ readonly THIS_DIR
LIB_DIR="${THIS_DIR}/../lib/super_unko"
readonly LIB_DIR

case ${OSTYPE} in
darwin*)
COW_FILE="${LIB_DIR}/unko_mb.cow"
;;
*)
COW_FILE="${LIB_DIR}/unko.cow"
;;
esac
COW_FILE="${LIB_DIR}/unko_mb.cow"
if ! (cowsay -f "${COW_FILE}" 'うんこ' | grep -qe 'うんこ' &&
cowsay -f "${COW_FILE}" 'もりもり' | grep -qe '💩'); then
COW_FILE="${LIB_DIR}/unko.cow"
fi

cowthink -f "${COW_FILE}" "$@"

0 comments on commit 4861815

Please sign in to comment.