remove bin directory
This commit is contained in:
parent
a88c50569c
commit
67c899902c
@ -1,11 +0,0 @@
|
|||||||
#!/usr/bin/perl -w
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
|
|
||||||
foreach my $arg (@ARGV)
|
|
||||||
{
|
|
||||||
my $out = $arg;
|
|
||||||
$out =~ s/\....$//;
|
|
||||||
system('mplayer', '-vo', 'null', '-ao', "pcm:file=$out.wav", $arg);
|
|
||||||
}
|
|
||||||
|
|
43
bin/gpgedit
43
bin/gpgedit
@ -1,43 +0,0 @@
|
|||||||
#!/usr/bin/perl
|
|
||||||
|
|
||||||
# Author: Josh Holtrop
|
|
||||||
# Purpose: edit a file encrypted by gpg
|
|
||||||
# Set environment variable GPGEDIT_RECIPIENT to specify the recipient
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
|
|
||||||
sub usage
|
|
||||||
{
|
|
||||||
print STDERR "Usage: $0 <file>\n";
|
|
||||||
exit(42);
|
|
||||||
}
|
|
||||||
|
|
||||||
usage() unless ($#ARGV >= 0);
|
|
||||||
my $fname = shift(@ARGV);
|
|
||||||
my $dfname = $fname;
|
|
||||||
$dfname =~ s/\.gpg$//i;
|
|
||||||
|
|
||||||
my $result = system('gpg', '--decrypt', '--output', $dfname, $fname);
|
|
||||||
if ($result != 0)
|
|
||||||
{
|
|
||||||
print STDERR "Error decrypting: exiting.\n";
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
my $editor = $ENV{'EDITOR'};
|
|
||||||
$editor = 'vim' if ($editor =~ /^\s*$/);
|
|
||||||
|
|
||||||
system($editor, $dfname);
|
|
||||||
|
|
||||||
my $recipient = $ENV{'GPGEDIT_RECIPIENT'};
|
|
||||||
my @cmd = ('gpg', '--encrypt');
|
|
||||||
if ($recipient !~ /^\s*$/)
|
|
||||||
{
|
|
||||||
push(@cmd, '--recipient', $recipient);
|
|
||||||
}
|
|
||||||
push(@cmd, $dfname);
|
|
||||||
|
|
||||||
system('mv', $fname, "$fname~");
|
|
||||||
system(@cmd);
|
|
||||||
unlink($dfname);
|
|
@ -1,4 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
define="$1"
|
|
||||||
exec grep --exclude-dir .svn --color=auto -R "define *\\<${define}\\>" .
|
|
@ -1,99 +0,0 @@
|
|||||||
#!/usr/bin/perl
|
|
||||||
# Josh Holtrop
|
|
||||||
# 2006-05-05
|
|
||||||
|
|
||||||
use warnings;
|
|
||||||
use strict;
|
|
||||||
|
|
||||||
sub usage
|
|
||||||
{
|
|
||||||
print "Usage: $0 [options] command [args]\n";
|
|
||||||
print "Options:\n";
|
|
||||||
print " -q Run <command> on hosts sequentially (default in parallel)\n";
|
|
||||||
print " -s<ssh> Use <ssh> instead of 'ssh' for a remote shell program\n";
|
|
||||||
print " -u<user> Use username <user> instead of your own\n";
|
|
||||||
print " -h<hostlist> The hosts to run the command on, comma-separated\n";
|
|
||||||
print " If the -h option is not given, the host list is\n";
|
|
||||||
print " read from standard input, one host per line\n";
|
|
||||||
exit(42);
|
|
||||||
}
|
|
||||||
|
|
||||||
my $ssh = 'ssh';
|
|
||||||
my $user = '';
|
|
||||||
my $seq = 0;
|
|
||||||
my @hosts = ();
|
|
||||||
my @command = ();
|
|
||||||
|
|
||||||
for (my $i = 0; $i <= $#ARGV; $i++)
|
|
||||||
{
|
|
||||||
if ($ARGV[$i] eq '-q')
|
|
||||||
{
|
|
||||||
$seq = 1;
|
|
||||||
}
|
|
||||||
elsif ($ARGV[$i] =~ /^-s(.*)$/)
|
|
||||||
{
|
|
||||||
if (length($1) > 0)
|
|
||||||
{
|
|
||||||
$ssh = $1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
usage() if ($i == $#ARGV);
|
|
||||||
$ssh = $ARGV[++$i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elsif ($ARGV[$i] =~ /^-h(.*)$/)
|
|
||||||
{
|
|
||||||
if (length($1) > 0)
|
|
||||||
{
|
|
||||||
@hosts = split(/,/, $1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
usage() if ($i == $#ARGV);
|
|
||||||
@hosts = split(/,/, $ARGV[++$i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elsif ($ARGV[$i] =~ /^-u(.*)$/)
|
|
||||||
{
|
|
||||||
if (length($1) > 0)
|
|
||||||
{
|
|
||||||
$user = $1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
usage() if ($i == $#ARGV);
|
|
||||||
$user = $ARGV[++$i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
# We've reached the command
|
|
||||||
@command = splice(@ARGV, $i);
|
|
||||||
last;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$user .= '@' if ($user ne '');
|
|
||||||
usage() if ($#command < 0);
|
|
||||||
|
|
||||||
if ($#hosts < 0)
|
|
||||||
{
|
|
||||||
# Read hosts from stdin
|
|
||||||
while (my $host = <STDIN>)
|
|
||||||
{
|
|
||||||
chomp($host);
|
|
||||||
push(@hosts, $host);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach my $host (@hosts)
|
|
||||||
{
|
|
||||||
my $f = $seq ? 0 : fork();
|
|
||||||
$f || system($ssh, "$user$host", @command);
|
|
||||||
exit(0) unless ($f || $seq); # Exit if not parent and not sequential
|
|
||||||
}
|
|
||||||
|
|
||||||
while (wait() != -1) {} # Wait for all children to exit
|
|
||||||
|
|
||||||
exit(0);
|
|
4
gpgedit
4
gpgedit
@ -1,5 +1,9 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
|
||||||
|
# Author: Josh Holtrop
|
||||||
|
# Purpose: edit a file encrypted by gpg
|
||||||
|
# Set environment variable GPGEDIT_RECIPIENT to specify the recipient
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl
|
||||||
# Josh Holtrop
|
# Josh Holtrop
|
||||||
# 2006-05-05
|
# 2006-05-05
|
||||||
|
|
||||||
|
use warnings;
|
||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
sub usage
|
sub usage
|
||||||
@ -96,4 +97,3 @@ foreach my $host (@hosts)
|
|||||||
while (wait() != -1) {} # Wait for all children to exit
|
while (wait() != -1) {} # Wait for all children to exit
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user