From 04f33bfa19ff5a84bc97010b589624f384ee7c06 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 9 Apr 2011 00:27:31 -1100 Subject: debilianized for KREBS --- noise | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/noise b/noise index c410168c..bd6b17c8 100755 --- a/noise +++ b/noise @@ -75,7 +75,7 @@ cleanup() { exec 2>&1 qname="`readlink -f "$0"`" dirname="`dirname "$qname"`" -export HOME='/home/shack' +export HOME='/home/noise' if test -d "$dirname/modules" ; then export NOISE_PATH="${NOISE_PATH+$NOISE_PATH:}$dirname/modules" export NOISE_PATH="${NOISE_PATH+$NOISE_PATH:}$HOME/noise/modules" @@ -90,7 +90,7 @@ touch $env ## ## readline() { - { read && echo "$REPLY" ; } | sed -rn " + { read REPLY && echo "$REPLY" ; } | sed -rn " s/[']//g s/~%/\n/g s/([^\\])([#<>])/\1\\\\\2/g @@ -108,13 +108,14 @@ while echo -n "$noise_prompt" && eval "`readline`" ; do for dir in `echo "$NOISE_PATH" | tr : \ ` ; do module="$dir/$command" if test -x "$module" ; then - shift +#echo foo $module:$@: + #shift eval 'NOISE="$0" NOISE_pid="$$" NOISE_linefeed="$linefeed" "$module"' "$args" continue 2 fi done ## funcall - if type noise_$command &>/dev/null ; then + if type noise_$command | grep -q function ; then eval 'noise_$command' "$args" continue fi @@ -139,7 +140,10 @@ commit ` sed -rn ' s/.*\(SLOC\)[[:space:]]*=[[:space:]]*([0-9]+)$/\1/p '` SLOC, ` - { ls $dirname/modules/ ; ls ~shack/noise/modules/ ; } | sort | uniq | wc -l + { + ls $dirname/modules/ + test -d ~noise/modules && ls ~noise/modules/ + } | sort | uniq | wc -l ` mods, `grep ^- $dirname/TODO | wc -l`+ TODOs and drive the irregular Hackathon @shackspace. Follow http://twitter.com/shackspam FTW! @@ -167,7 +171,7 @@ echo '/set -q prompt "READY.~%"' ## ## ## -while read ; do +while read REPLY; do case $REPLY in (/quit) echo /quit ; exit ;; (*) tr \; \\n | grep . ;; -- cgit v1.2.3