Permalink
Browse files

no need for hooks anymore

  • Loading branch information...
1 parent 8112120 commit 53d8d332ca84f13cc5c6235e29cc86e2519e4ded @lukec lukec committed Nov 13, 2012
Showing with 0 additions and 49 deletions.
  1. +0 −12 hooks/bathroom.d/record
  2. +0 −3 hooks/plunger.d/record
  3. +0 −12 hooks/plunger.d/tweeter
  4. +0 −22 hooks/space.d/tweeter
View
12 hooks/bathroom.d/record
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-echo "bathroom recorder: $1 $2"
-if [ "$1" == "door" ]; then
- if [ "$2" == "open" ]; then
- perl -le 'print time' > status.d/last-open
- elif [ "$2" == "closed" ]; then
- perl -le 'print time' > status.d/last-close
- fi
-fi
-
-
View
3 hooks/plunger.d/record
@@ -1,3 +0,0 @@
-#!/bin/bash
-
-perl -le 'print time' > status.d/last-plunge
View
12 hooks/plunger.d/tweeter
@@ -1,12 +0,0 @@
-#!/usr/bin/perl
-use strict;
-use warnings;
-use VHS;
-
-my $arg = shift @ARGV;
-my $what = shift;
-exit unless $arg;
-
-exit unless $arg eq 'down';
-
-VHS->send_tweet("My toilet flushed.");
View
22 hooks/space.d/tweeter
@@ -1,22 +0,0 @@
-#!/usr/bin/perl
-use strict;
-use warnings;
-use VHS;
-
-my $what = shift @ARGV;
-my $arg = shift @ARGV;
-exit unless $arg;
-
-my %msg_map = (
- 'open' => "My $what opened!",
- test => 'My systems are being tested!',
-);
-
-if (my $msg = $msg_map{$arg}) {
- my $image_url = VHS->take_picture() if $arg eq 'open';;
- VHS->send_tweet($msg, $image_url);
-}
-
-exit;
-
-

0 comments on commit 53d8d33

Please sign in to comment.