changeset 1906:5ec896dab821

<oerjan> hg diff -r1891:1871 | patch -p1
author HackBot
date Wed, 30 Jan 2013 12:31:13 +0000
parents 9f2265581d61
children 09517d36543a
files bin/? bin/?e bin/delquote bin/delquotee
diffstat 4 files changed, 2 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/bin/?	Wed Jan 30 12:26:56 2013 +0000
+++ b/bin/?	Wed Jan 30 12:31:13 2013 +0000
@@ -3,7 +3,7 @@
 topic1=$(echo "$topic" | sed "s/s$//")
 cd wisdom
 if [ \( "$topic" = "ngevd" \) -a \( -e ngevd \) ];
-    then iconv -f UTF-16LE -t UTF-8 -c /dev/urandom;
+    then cat /dev/urandom;
     elif [ -e "$topic" ];
     then cat "$topic";
     elif [ -e "$topic1" ];
--- a/bin/?e	Wed Jan 30 12:26:56 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-#!/bin/sh
-topic=$(echo "$1" | tr A-Z a-z | sed "s/ *$//")
-topic1=$(echo "$topic" | sed "s/s$//")
-cd wisdom
-if [ \( "$topic" = "ngevd" \) -a \( -e ngevd \) ];
-    then iconv -f UTF-16 -t UTF-8 -c /dev/urandom;
-    elif [ -e "$topic" ];
-    then cat "$topic";
-    elif [ -e "$topic1" ];
-    then cat "$topic1";
-    else echo "$1? ¯\(°_o)/¯"; exit 1;
-fi
-
--- a/bin/delquote	Wed Jan 30 12:26:56 2013 +0000
+++ b/bin/delquote	Wed Jan 30 12:31:13 2013 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 id=$1
-if ! expr "$id" ">=" 0 "&" "$id" "<" $(wc -l <quotes) >/dev/null; then id=$(expr $RANDOM % $(wc -l <quotes); fi
+expr "$1" + 0 >/dev/null 2>&1 || exit 1
 head -n $((id-1)) quotes >quotes.new
 tail -n +$((id+1)) quotes >>quotes.new
 diff quotes quotes.new >/dev/null && exit 1
--- a/bin/delquotee	Wed Jan 30 12:26:56 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-#!/bin/sh
-id=$1
-expr "$1" + 0 >/dev/null 2>&1 || exit 1
-head -n $((id-1)) quotes >quotes.new
-tail -n +$((id+1)) quotes >>quotes.new
-diff quotes quotes.new >/dev/null && exit 1
-printf "*poof*%s" "$(quote $id | cut -d')' -f2-)"
-mv quotes.new quotes
-