summaryrefslogtreecommitdiffstats
path: root/Kübelwagen/alarm
diff options
context:
space:
mode:
authortv <tv@iiso>2011-09-12 01:40:08 +0200
committertv <tv@iiso>2011-09-12 01:40:08 +0200
commit68c0644cf950f84edf4ac225172049d6a43fd0d4 (patch)
tree672f75a450a73f06b2e3c24312e2d08d47628ee0 /Kübelwagen/alarm
parent32b8f75f145789d87407bb0c4e5d09be992e6666 (diff)
//Kübelwagen/alarm: now more awesome than evar!
Diffstat (limited to 'Kübelwagen/alarm')
-rwxr-xr-x[-rw-r--r--]Kübelwagen/alarm28
1 files changed, 25 insertions, 3 deletions
diff --git a/Kübelwagen/alarm b/Kübelwagen/alarm
index 601a18db..a117c433 100644..100755
--- a/Kübelwagen/alarm
+++ b/Kübelwagen/alarm
@@ -1,5 +1,27 @@
#! /bin/sh
-echo 'You are made of stupid!' >&2
-exit 23
+#
+# //Kübelwagen/alarm SLEEPARGS...
+#
+# where SLEEPARGS are passed to sleep(3)
+#
+set -euf
+cd $(dirname $(readlink -f $0))
+exec >&2
-sleep 5h 19m && while :; do echo $(echo "($(od -tu -An -N 2 /dev/urandom)%1000)+500"|bc) $(echo "($(od -tu -An -N 2 /dev/urandom)%500)+100"|bc) ; done | ./a.out 1
+make
+
+jackd -d alsa &
+trap "kill -0 $! && kill $!" EXIT INT
+
+for i in `seq 8000 1000 10000`; do
+ echo $i 100
+done | ./a.out 1
+echo 'if you heard that sound, then goto sleep..^_^'
+
+echo sleep "$@"
+sleep "$@"
+
+echo 'wake up!'
+while :; do
+ echo $(echo "($(od -tu -An -N 2 /dev/urandom)%1000)+500"|bc) $(echo "($(od -tu -An -N 2 /dev/urandom)%500)+100"|bc)
+done | ./a.out 1