diff options
author | root <root@krebs> | 2011-04-09 00:27:31 -1100 |
---|---|---|
committer | root <root@krebs> | 2011-04-09 00:27:31 -1100 |
commit | 04f33bfa19ff5a84bc97010b589624f384ee7c06 (patch) | |
tree | c177a558789a7778b9bb4c332fc51083d9235b55 | |
parent | 0135c364a39578b1cf56cf168774daaf3a5a848d (diff) |
debilianized for KREBS
-rwxr-xr-x | noise | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -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 [34;4mhttp://twitter.com/shackspam[;1;33m [5mFTW[;1;33m! @@ -167,7 +171,7 @@ echo '/set -q prompt "[30mREADY.[m~%"' ## ## ## -while read ; do +while read REPLY; do case $REPLY in (/quit) echo /quit ; exit ;; (*) tr \; \\n | grep . ;; |