[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.2.10-30-g417acdd



The following commit has been merged in the master branch:
commit 07d960efad84ae091b640c1ba1b1959950d8255d
Author: Russ Allbery <rra@debian.org>
Date:   Sat May 9 20:54:31 2009 -0700

    Remove lib/scan_script.pl
    
    * lib/scan_script.pl:
      + [RA] Removed.  A start at parsing shell scripts that was never
        finished and wasn't usable in its current form.

diff --git a/debian/changelog b/debian/changelog
index 2834225..7964f5d 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -48,6 +48,10 @@ lintian (2.2.11) UNRELEASED; urgency=low
       tests so that tar's "implausibly old timestamp" errors use a
       consistent epoch.  Thanks, Raphael Geissert.
 
+  * lib/scan_script.pl:
+    + [RA] Removed.  A start at parsing shell scripts that was never
+      finished and wasn't usable in its current form.
+
   * man/lintian.1:
    + [ADB] Document the new --area command line option and update the
      documentation of --section to indiciate that it is deprecated in
diff --git a/lib/scan_script.pl b/lib/scan_script.pl
deleted file mode 100644
index 9d9fd46..0000000
--- a/lib/scan_script.pl
+++ /dev/null
@@ -1,118 +0,0 @@
-# -*- perl -*-
-
-# Copyright (C) 1998 Richard Braakman
-# 
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-# 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, you can find it on the World Wide
-# Web at http://www.gnu.org/copyleft/gpl.html, or write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
-# MA 02110-1301, USA.
-
-# Functions are defined here to read a shell script and return it as
-# a list of tokens.
-
-# We do NOT do history expansion, because it's normally turned off in
-# shell scripts.  
-
-# Possible tokens:
-# literal:
-#  <<- << >> && || <> >| >& ;; (( <& >& ( ) < > ; & | -
-#
-# end of line: EOL
-
-use strict;
-
-sub scan_script {
-    my $tokenval = '';
-    my @tokens = ();
-    my $state = 0; #base
-    my $reserved_ok = 1;
-    my $line = 1;
-
-    foreach (split(/\n/, $_[0])) {
-	if ($state == 0) {  # base
-	    s/^\s+//;               # skip leading whitespace
-	    if (m/^\#|^$/) {
-		# skip blank lines, skip comments till end of line
-		push(@tokens, 'EOL');
-		$reserved_ok = 1;
-		$line++;
-		next;
-	    }
-
-	    elsif (s/^( <<- | << | >> | <> | >\| | >& )//x) {
-		push(@tokens, $1);
-		$reserved_ok = 0;
-		redo;
-	    }
-
-	    elsif (s/^( && | \|\| )//x) {
-		push(@tokens, $1);
-		$reserved_ok = 1;
-		redo;
-	    }
-
-	    elsif (s/^ ;; //x) {
-		push(@tokens, ';;');
-		$state = 1; # case pattern
-		$reserved_ok = 1;
-		redo;
-	    }
-
-	    elsif ($reserved_ok and s/^ \(\( //x) {
-		push(@tokens, '((');
-		$state = 2; # dparen arithmetic
-		redo;
-		# XXX parse_arith_cmd
-	    }
-
-	    elsif (s/^( <& | >& )//x) {
-		push(@tokens, $1);
-		# hack <& - and >& - cases.
-		# No comments or newlines can appear between the <& and -.
-		if (s/^ \s* -//x) {
-		    push(@tokens, '-');
-		}
-		$reserved_ok = 0; 
-		redo;
-	    }
-
-	    elsif (m/^( <\( | >\( )/x) {
-		$state = 3; # word
-		$reserved_ok = 0;
-		redo;
-	    }
-
-	    elsif (s/^( < | > )//x) {
-		push (@tokens, $1);
-		$reserved_ok = 0;
-		redo;
-	    }
-
-	    elsif (s/^([();&|])//) {
-		push (@tokens, $1);
-		$reserved_ok = 1;
-		redo;
-	    }
-	    
-	    else {
-		$state = 3; # word
-		redo;
-	    }
-	}
-
-    }
-
-    return @tokens;
-}
-

-- 
Debian package checker


Reply to: