mirror of
https://github.com/MillironX/cowsay-cows.git
synced 2024-11-21 22:36:04 +00:00
Hard-code all known distro COWPATHs
Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com>
This commit is contained in:
parent
bb0634e8fa
commit
160539efea
1 changed files with 14 additions and 5 deletions
|
@ -1,12 +1,21 @@
|
||||||
# Only add stuff if cowsay is installed
|
# Only add stuff if cowsay is installed
|
||||||
if [ $(command -v cowsay) ]; then
|
if [ $(command -v cowsay) ]; then
|
||||||
# Add the originally present cows to COWPATH
|
# Add default install cows to COWPATH
|
||||||
for COW in $(find $(whereis cowsay | awk '{print $3}') -name "*.cow" | xargs dirname | uniq); do
|
# Search for cows in $PREFIX/share/cows. According to the original repo
|
||||||
export COWPATH=$COW:$COWPATH
|
# (https://github.com/tnalpgge/rank-amateur-cowsay), this is the place to find
|
||||||
done
|
# cowfiles. Arch, local builds (including Homebrew) and Android/Termux are the
|
||||||
|
# only distros to stick with this location afaik
|
||||||
|
COWPATH=$COWPATH:$(dirname $(dirname $(command -v cowsay)))/share/cows
|
||||||
|
|
||||||
|
# Add the oddball cowfile locations
|
||||||
|
COWPATH=$COWPATH:/usr/share/cowsay # RHEL/Fedora
|
||||||
|
COWPATH=$COWPATH:/usr/share/cowsay/cows # Debian/Ubuntu
|
||||||
|
|
||||||
# Add the plugin's cows to COWPATH
|
# Add the plugin's cows to COWPATH
|
||||||
export COWPATH=$(dirname $0):$COWPATH
|
COWPATH=$(dirname $0):$COWPATH
|
||||||
|
|
||||||
|
# COWPATH complete! Use it!
|
||||||
|
export COWPATH
|
||||||
|
|
||||||
# Create some fun aliases
|
# Create some fun aliases
|
||||||
alias bullsay="cowsay -f bull"
|
alias bullsay="cowsay -f bull"
|
||||||
|
|
Loading…
Reference in a new issue