summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot <root@krebs>2011-04-09 00:27:31 -1100
committerroot <root@krebs>2011-04-09 00:27:31 -1100
commit04f33bfa19ff5a84bc97010b589624f384ee7c06 (patch)
treec177a558789a7778b9bb4c332fc51083d9235b55
parent0135c364a39578b1cf56cf168774daaf3a5a848d (diff)
debilianized for KREBS
-rwxr-xr-xnoise16
1 files 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 . ;;