From 4e03b7d918207bb1f9a80295b3cc70986dfc1f05 Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Sat, 15 Aug 2015 21:25:06 -0400 Subject: [PATCH] fix mk-latest --- Makefile | 2 +- bin/mk-latest | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ab069ec..4f48bd5 100644 --- a/Makefile +++ b/Makefile @@ -81,7 +81,7 @@ docs/fips.inc: source/.htaccess: @rm -f @? - ./bin/mk-latest >$@ + ./bin/mk-latest source >$@ source/license.txt: $(SNAP)/LICENSE @rm -f $@ cp $? $@ diff --git a/bin/mk-latest b/bin/mk-latest index 519c353..14f586f 100755 --- a/bin/mk-latest +++ b/bin/mk-latest @@ -1,8 +1,16 @@ #! /usr/bin/perl -w use strict; +die "Missing args\n" if $#ARGV < 0; +my $SRCDIR = $ARGV[0]; shift; + +chdir $SRCDIR || die "Can't chdir $SRCDIR, $!"; + my @tarballs = - sort grep /openssl-\d+\.\d+\.\d+[a-z]*\.tar\.gz$/, glob("openssl-*.tar.gz"); + sort grep /openssl-\d+\.\d+\.\d+[a-z]*\.tar\.gz$/, + glob("openssl-*.tar.gz"); +die "No tgz files found in $SRCDIR?\n" if $#tarballs < 1; + my %series = (); foreach(@tarballs) { my ($version, $serie) = /^openssl-((\d+\.\d+\.\d+)[a-z]*)\./; -- 2.34.1