git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormail_redacted_for_web 2021-10-06 09:09:01 +0200
committermail_redacted_for_web 2021-10-06 09:09:01 +0200
commitf63155b22d83e9007094da31b5f1898f995f03f7 (patch)
treed9e2e18fd7a5d0bf9f3408ecc9b06f6a26a04c17
parent2ca28dc4b0c7d5b546e858389c50b7296c2b5e9e (diff)
downloadwachenwerden-f63155b22d83e9007094da31b5f1898f995f03f7.tar.bz2
+sit
-rwxr-xr-xbin/sit34
1 files changed, 34 insertions, 0 deletions
diff --git a/bin/sit b/bin/sit
new file mode 100755
index 0000000..eab8955
--- /dev/null
+++ b/bin/sit
@@ -0,0 +1,34 @@
+#!/usr/bin/env sh
+
+# a simple beep implementation for the "Hinweiston nach 1 TR 110-1, Kap. 8.8", also called "Sonderinformationston" or - shorthand - SIT.
+
+function zuhuelf {
+ printf "USAGE: %b [ -l ]\\n\\n" "$(basename "$0")"
+ printf "DESCRIPTION: Hinweiston nach 1 TR 110-1, Kap. 8.8 / SonderInformationsTon\\n\\n"
+ (
+ printf -- "-h:;This help\\n"
+ printf -- "-l:;Loop the tone. Delays between loops are also implemented according to\\n"
+ printf " ;1 TR 110-1 Kap. 8.8.\\n"
+ )|column -ts\;
+ printf "\\n"
+}
+
+LOOPADOOP=0
+while getopts :hl SHOPT;do
+ case "$SHOPT" in
+ "h") zuhuelf;exit 0;;
+ "l") LOOPADOOP=1;;
+ esac
+done
+
+function sittone {
+ # chain the tones to avoid kernel delays between tones
+ beep -l 330 -f 950 -n -l 330 -f 1400 -n -l 330 -f 1800
+}
+
+if [ "$LOOPADOOP" -eq 1 ];then
+ # TR 110-1 specifies a delay of 1000ms between repetitions
+ while true; do sittone; sleep 1; done
+else
+ sittone
+fi