summaryrefslogtreecommitdiffstats
path: root/bin/check-new-issues
diff options
context:
space:
mode:
authorRaphael Geissert <geissert@debian.org>2010-01-05 00:36:43 +0000
committerRaphael Geissert <geissert@debian.org>2010-01-05 00:36:43 +0000
commitfd34df65f930e294361036740cb03cea83e85122 (patch)
tree36e40e5d17d8f13e8f669f9d8070c72d2cef0659 /bin/check-new-issues
parent0689bdc688a2ea5767c5ee184830898e1fdf4ac1 (diff)
add .h command to list available commands
add ! command to execute any command via system() git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@13713 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'bin/check-new-issues')
-rwxr-xr-xbin/check-new-issues32
1 files changed, 25 insertions, 7 deletions
diff --git a/bin/check-new-issues b/bin/check-new-issues
index b20544e3d0..13553d9b92 100755
--- a/bin/check-new-issues
+++ b/bin/check-new-issues
@@ -9,24 +9,33 @@ use Term::ReadLine;
my %opts;
getopts('ln:fhi:t:Tca:e:uU', \%opts);
-if ($opts{h}) {
+sub print_commands {
print <<'EOF';
-downloads allitems.txt from cve.mitre.org and shows full decription for each
-"TODO: check" item (2003 and newer). Then
-
-- tries to guess product name and php filename and does
- apt-cache and apt-file search
-- waits for input:
* blank line to skip to next issue
* .fname to do "apt-file search name"
* .cname to do "apt-cache search name"
* .wname to look up name in wnpp
* .mpackage to search data/embedded-code-copies for "package"
* .rpackage to launch an editor with a report of the issue against "package"
+ * !command to execute a command with system() without any escaping
* v or e to launch an editor with the current item
* q to save and quit
* CTRL-C to quit without saving
* everything else is inserted as product name for a NOT-FOR-US
+EOF
+}
+
+if ($opts{h}) {
+ print <<'EOF';
+downloads allitems.txt from cve.mitre.org and shows full decription for each
+"TODO: check" item (2003 and newer). Then
+
+- tries to guess product name and php filename and does
+ apt-cache and apt-file search
+- waits for input:
+EOF
+ print_commands;
+ print <<'EOF';
Use "svn diff" and "svn revert" as needed ;-)
@@ -239,6 +248,15 @@ TODO: foreach my $todo (reverse sort @todos) {
search_embed($s) or print "none\n";
next READ;
}
+ elsif ($r=~ /^.h/i ) {
+ print_commands;
+ next READ;
+ }
+ elsif ($r=~ /^!(.+)$/ ) {
+ system($1);
+ print "exit status: $?\n";
+ next READ;
+ }
elsif ($r=~ /^q$/i ) {
last TODO;
}

© 2014-2024 Faster IT GmbH | imprint | privacy policy