summaryrefslogtreecommitdiffstats
path: root/noise
diff options
context:
space:
mode:
Diffstat (limited to 'noise')
-rwxr-xr-xnoise25
1 files changed, 22 insertions, 3 deletions
diff --git a/noise b/noise
index 9d4f815f..c410168c 100755
--- a/noise
+++ b/noise
@@ -39,6 +39,22 @@ noise_set() { # set a variable
esac
}
+noise_unset() { # unset a variable
+ case "$1" in
+ (-q|--quiet) echo=: ; shift ;;
+ (*) echo=echo ;;
+ esac
+ case $# in
+ (1) ##
+ unset "noise_$1"
+ sed -ni "/^$1=/!p" $env
+ ;;
+ (*)
+ fail "broken commandline: $@"
+ ;;
+ esac
+}
+
noise_quit() { # exit
echo "Good bye!"
exit
@@ -56,7 +72,7 @@ cleanup() {
rmdir /tmp/noise 2>/dev/null
}
-
+exec 2>&1
qname="`readlink -f "$0"`"
dirname="`dirname "$qname"`"
export HOME='/home/shack'
@@ -64,7 +80,7 @@ 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"
fi
-mkdir -vp /tmp/noise/$$
+mkdir -p /tmp/noise/$$
linefeed="/tmp/noise/$$/linefeed"
env="/tmp/noise/$$/environment"
trap cleanup EXIT
@@ -111,7 +127,10 @@ jobs="${jobs+$jobs }`jobs -p`"
##
cat<<EOF
Welcome to 23.shack version 0.9 beta 4 \
-commit `cat $dirname/.git/refs/heads/master | dd count=23 bs=1`...
+commit `
+ cd $dirname &&
+ git log -n 1 | head -n 1 | cut -d\ -f 2 | dd count=23 bs=1 2>/dev/null
+`...

## Motto Of The Day\