kunt

golang IRC bot
git clone git://git.2f30.org/kunt
Log | Files | Refs | LICENSE

commit fcb5b0176e6aab7b4a6cb8fcb68ce0f29120086f
parent 70420c9c73cdd9b9439fb353686b6e5b932f094d
Author: sin <sin@2f30.org>
Date:   Tue, 30 Apr 2013 15:29:10 +0100

add encdb and decdb

Diffstat:
Asrc/kunt/db/decdb | 12++++++++++++
Asrc/kunt/db/encdb | 12++++++++++++
2 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/src/kunt/db/decdb b/src/kunt/db/decdb @@ -0,0 +1,12 @@ +#!/bin/sh + +if [ $# -eq 1 ]; then + key=$1 + for i in quotes/*; do + ../../bdec/bdec ${key} "$i" > "$i".tmp && + mv "$i".tmp "$i" + done +else + echo usage: decdb key 1>&2 + exit 1 +fi diff --git a/src/kunt/db/encdb b/src/kunt/db/encdb @@ -0,0 +1,12 @@ +#!/bin/sh + +if [ $# -eq 1 ]; then + key=$1 + for i in quotes/*; do + ../../benc/benc ${key} "$i" > "$i".tmp && + mv "$i".tmp "$i" + done +else + echo usage: encdb key 1>&2 + exit 1 +fi