mirror of
https://github.com/erkin/ponysay.git
synced 2025-02-27 14:14:31 +01:00
/tmp/ponythink instead of /tmp/.ponythink
This commit is contained in:
parent
110c73186b
commit
c374d57fd3
2 changed files with 4 additions and 4 deletions
6
ponysay
6
ponysay
|
@ -173,9 +173,9 @@ say() {
|
||||||
ccmd=$(for c in $(echo $PATH":" | sed -e 's/:/\/'"$cmd"' /g'); do if [[ -f $c ]]; then echo $c; break; fi done)
|
ccmd=$(for c in $(echo $PATH":" | sed -e 's/:/\/'"$cmd"' /g'); do if [[ -f $c ]]; then echo $c; break; fi done)
|
||||||
|
|
||||||
if [[ ${0} == *ponythink ]]; then
|
if [[ ${0} == *ponythink ]]; then
|
||||||
cat <(echo -e $pcmd) $ccmd > "/tmp/.ponythink"
|
cat <(echo -e $pcmd) $ccmd > "/tmp/ponythink"
|
||||||
perl '/tmp/.ponythink' "$@"
|
perl '/tmp/ponythink' "$@"
|
||||||
rm '/tmp/.ponythink'
|
rm '/tmp/ponythink'
|
||||||
else
|
else
|
||||||
perl <(cat <(echo -e $pcmd) $ccmd) "$@"
|
perl <(cat <(echo -e $pcmd) $ccmd) "$@"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -17,7 +17,7 @@ foreach $arg (@ARGV)
|
||||||
{
|
{
|
||||||
# Format names from ponyies names
|
# Format names from ponyies names
|
||||||
$arg =~ s/([a-z])([A-Z])/\1 \2/;
|
$arg =~ s/([a-z])([A-Z])/\1 \2/;
|
||||||
$arg =~ s/_(.*)/\t(\1)/;
|
#$arg =~ s/_(.*)/\t(\1)/; ## Incompatible with `ponysay -L`
|
||||||
|
|
||||||
if ($first == 1)
|
if ($first == 1)
|
||||||
{ $first = 0;
|
{ $first = 0;
|
||||||
|
|
Loading…
Reference in a new issue