aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Feist <shabble@metavore.org>2011-05-05 04:00:13 +0000
committerTom Feist <shabble@metavore.org>2011-05-05 04:00:13 +0000
commitdea7a4c8c52cfceffcc67947d46637c75031b5ed (patch)
treecd16e9b3c217fb836301f806d0611de0db1a8bb9
parentvim_mode: small comment change test (diff)
downloadirssi-scripts-dea7a4c8c52cfceffcc67947d46637c75031b5ed.tar.gz
irssi-scripts-dea7a4c8c52cfceffcc67947d46637c75031b5ed.zip
moved hook instead of symlink
-rwxr-xr-xgit-update-changed-param-hook38
1 files changed, 0 insertions, 38 deletions
diff --git a/git-update-changed-param-hook b/git-update-changed-param-hook
deleted file mode 100755
index 0407e29..0000000
--- a/git-update-changed-param-hook
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/usr/bin/env perl
-
-# -*- mode: cperl -*-
-
-
-use strict;
-use warnings;
-use File::Spec;
-use feature qw/say/;
-
-my $file_cmd = "/usr/bin/file";
-my $git_cmd = "/opt/local/bin/git";
-
-my $root_dir = qx/$git_cmd rev-parse --show-toplevel/;
-chomp ($root_dir);
-
-my @changed_files = qx/git status --porcelain -u no/;
-
-foreach my $file (@changed_files) {
- chomp $file;
- if (is_irssi_script($file)) {
- system(File::Spec->catfile($root_dir, 'changed_update.pl'), $file);
- }
-}
-
-
-sub is_irssi_script {
- my ($file) = @_;
- my $full_path = File::Spec->catfile($root_dir, $file);
- return 0 unless -f $full_path;
- my $file_result = system("/usr/bin/grep -s -q '\%IRSSI' 1>/dev/null 2>&1");
- if ($file_result != 0) {
- return 0;
- } else {
- return 1;
- }
-}
-