aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGuenter Knauf <lists@gknw.net>2011-04-14 01:27:39 +0200
committerGuenter Knauf <lists@gknw.net>2011-04-14 01:27:39 +0200
commite84730948d8a89f27a002a0e9d148182f7a497cc (patch)
tree13c20c5eba680f1d9230690f8c27a848e2cf390a /lib
parent996630d5edc60df08cf3d3357612e44054214ff1 (diff)
Replaced var manipulations with perlish hacks.
Diffstat (limited to 'lib')
-rwxr-xr-xlib/mk-ca-bundle.pl6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/mk-ca-bundle.pl b/lib/mk-ca-bundle.pl
index b0c8698d8..231762e60 100755
--- a/lib/mk-ca-bundle.pl
+++ b/lib/mk-ca-bundle.pl
@@ -56,8 +56,7 @@ if ($opt_i) {
print ("=" x 78 . "\n");
}
-$0 =~ s/\\/\//g;
-$0 = substr($0, rindex($0, '/') + 1);
+$0 =~ s@.*(/|\\)@@;
if ($opt_h) {
printf("Usage:\t%s [-b] [-i] [-l] [-n] [-q] [-t] [-u] [-v] [<outputfile>]\n", $0);
print "\t-b\tbackup an existing version of ca-bundle.crt\n";
@@ -72,8 +71,7 @@ if ($opt_h) {
}
my $crt = $ARGV[0] || 'ca-bundle.crt';
-my $txt = substr($url, rindex($url, '/') + 1);
-$txt =~ s/\?.*//;
+(my $txt = $url) =~ s@(.*/|\?.*)@@g;
my $resp;