Mercurial > repo
diff bin/? @ 4531:7f957c1f4661
<oerjan> revert
author | HackBot |
---|---|
date | Sun, 16 Mar 2014 01:52:15 +0000 |
parents | 03afb1619ef2 |
children |
line wrap: on
line diff
--- a/bin/? Sun Mar 16 01:51:13 2014 +0000 +++ b/bin/? Sun Mar 16 01:52:15 2014 +0000 @@ -1,5 +1,13 @@ #!/bin/sh -topic=$(echo "$1" | tr A-Z a-z) -[ -e "wisdom/$topic" ] || { echo "$1? ¯\(°_o)/¯"; exit 1; } -cat "wisdom/$topic" +topic=$(echo "$1" | lowercase | sed "s/noo\+dl/nooodl/;s/ *$//") +topic1=$(echo "$topic" | sed "s/s$//") +cd wisdom +if [ \( "$topic1" = "ngevd" \) -a \( -e ngevd \) ]; + then cat /dev/urandom; + elif [ -e "$topic" ]; + then cat "$topic" | rnooodl; + elif [ -e "$topic1" ]; + then cat "$topic1" | rnooodl; + else echo "$1? ¯\(°_o)/¯"; exit 1; +fi