X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=util%2Fcopy.pl;h=c4aeea6a18cdf667231dbf357f9abddf6602bc6f;hp=eba6d5815e9cef6b312e71cdee6f5642b2ac06af;hb=5e3766e2f15b3a8ea696b194c32a141cbe668d4e;hpb=7dbbd4b35775948da01ca86ce9e94886f1347bbd diff --git a/util/copy.pl b/util/copy.pl index eba6d5815e..c4aeea6a18 100644 --- a/util/copy.pl +++ b/util/copy.pl @@ -1,4 +1,11 @@ -#!/usr/local/bin/perl +#! /usr/bin/env perl +# Copyright 2005-2016 The OpenSSL Project Authors. All Rights Reserved. +# +# Licensed under the OpenSSL license (the "License"). You may not use +# this file except in compliance with the License. You can obtain a copy +# in the file LICENSE in the source distribution or at +# https://www.openssl.org/source/license.html + use Fcntl; @@ -19,7 +26,7 @@ foreach $arg (@ARGV) { next; } $arg =~ s|\\|/|g; # compensate for bug/feature in cygwin glob... - foreach (glob $arg) + foreach (glob qq("$arg")) { push @filelist, $_; } @@ -33,7 +40,7 @@ if ($fnum <= 1) } $dest = pop @filelist; - + if ($fnum > 2 && ! -d $dest) { die "Destination must be a directory"; @@ -66,5 +73,5 @@ foreach (@filelist) close(OUT); print "Copying: $_ to $dfile\n"; } - +