aboutsummaryrefslogtreecommitdiff
path: root/pq4ps
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2012-08-18 18:24:00 +0200
committerMattias Andrée <maandree@operamail.com>2012-08-18 18:24:00 +0200
commit88baa565a0be9f623d0aa52c0d3148c234b51516 (patch)
tree082257eb7caf6d98c5b60c682ac4d92b78f6e855 /pq4ps
parent57ceac45a4891e0045c0aec91902ca6741ccf274 (diff)
downloadponysay-88baa565a0be9f623d0aa52c0d3148c234b51516.tar.gz
ponysay-88baa565a0be9f623d0aa52c0d3148c234b51516.tar.bz2
ponysay-88baa565a0be9f623d0aa52c0d3148c234b51516.zip
ponyquotes support
Diffstat (limited to 'pq4ps')
-rwxr-xr-xpq4ps39
1 files changed, 0 insertions, 39 deletions
diff --git a/pq4ps b/pq4ps
deleted file mode 100755
index 576a4e8..0000000
--- a/pq4ps
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/usr/bin/env bash
-
-INSTALLDIR="$(dirname "$(dirname "$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )")")" # Get main bash script directory's parent
-
-if [ $# == 1 ] && ([ "$1" == '-l' ] || [ "$1" == '--list' ]); then
- perl "$0.pl" "$INSTALLDIR" | cut -d @ -f 1 | uniq
-else
- _ponies="$(perl "$0.pl" "$INSTALLDIR")"
- ponies=()
-
- if (( $# > 0 )); then
- p=()
- for arg in "$@"; do
- p+="$(echo "$_ponies" | grep "^$arg@") "
- done
- _ponies=$p
- fi
-
- ponies=( $_ponies )
-
- if (( ${#ponies[@]} == 0 )); then
- ponies=()
- for arg in "$@"; do
- ponies+=( "$arg" )
- done
-
- p="${ponies[$RANDOM%${#ponies[@]}]}"
- q='I am totally speechless'
- echo "-f" $p $q
- else
- pony="${ponies[$RANDOM%${#ponies[@]}]}"
-
- p="$(echo $pony | cut -d '@' -f 1)"
- f="$(echo $pony | cut -d '@' -f 2)"
- q="$(cat "$INSTALLDIR/share/ponysay/quotes/$f")"
-
- echo "-f" $p $q
- fi
-fi