[libmoosex-has-sugar-perl] 15/120: Make sterilize env respond to more ENV variables
Intrigeri
intrigeri at moszumanska.debian.org
Wed Aug 27 21:35:06 UTC 2014
This is an automated email from the git hooks/post-receive script.
intrigeri pushed a commit to annotated tag 0.05070422-source
in repository libmoosex-has-sugar-perl.
commit 746ad1ccb413af9be7c5b4e111c34b85635476f0
Author: Kent Fredric <kentfredric at gmail.com>
Date: Sun Sep 22 03:36:52 2013 +1200
Make sterilize env respond to more ENV variables
---
sterilize_env.pl | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/sterilize_env.pl b/sterilize_env.pl
index 83d1b1b..df4c9de 100644
--- a/sterilize_env.pl
+++ b/sterilize_env.pl
@@ -3,15 +3,29 @@ use strict;
use warnings;
use utf8;
+sub diag {
+ print STDERR @_;
+ print STDERR "\n";
+}
+
+if ( not exists $ENV{STERILIZE_ENV} ) {
+ diag('STERILIZE_ENV unset');
+ exit 0;
+}
+if ( $ENV{STERILIZE_ENV} < 1 ) {
+ diag('STERLIZIE_ENV < 1, Not Sterilizing');
+ exit 0;
+}
if ( not exists $ENV{TRAVIS} ) {
- die "Is not travis!";
+ diag('Is not running under travis!');
+ exit 1;
}
for my $i (@INC) {
next if $i !~ /site/;
next if $i eq '.';
-
- # printf "%s\n", $i;
+ diag( 'Sterilizing files in ' . $i );
system( 'find', $i, '-type', 'f', '-delete' );
+ diag( 'Sterilizing dirs in ' . $i );
system( 'find', $i, '-depth', '-type', 'd', '-delete' );
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmoosex-has-sugar-perl.git
More information about the Pkg-perl-cvs-commits
mailing list