VirtualBox

source: vbox/trunk/src/libs/openssl-3.1.3/util/write-man-symlinks@ 102654

Last change on this file since 102654 was 101211, checked in by vboxsync, 14 months ago

openssl-3.1.3: Applied and adjusted our OpenSSL changes to 3.1.2. bugref:10527

File size: 1.2 KB
Line 
1#! /usr/bin/env perl
2# Copyright 2021 The OpenSSL Project Authors. All Rights Reserved.
3#
4# Licensed under the Apache License 2.0 (the "License"). You may not use
5# this file except in compliance with the License. You can obtain a copy
6# in the file LICENSE in the source distribution or at
7# https://www.openssl.org/source/license.html
8
9
10require 5.10.0;
11use warnings;
12use strict;
13
14use FindBin;
15use lib "$FindBin::Bin/perl";
16
17use OpenSSL::Util::Pod;
18
19if ($#ARGV + 1 != 5 || $ARGV[0] !~ /^(un)?install$/) {
20 print "Usage: write-man-symlinks [install|uninstall] src-dir build-dir man-page-name target-dir\n";
21 exit;
22}
23
24my $action = $ARGV[0];
25my $srcdir = $ARGV[1];
26my $builddir = $ARGV[2];
27my $manname = $ARGV[3];
28my $targetdir = $ARGV[4];
29
30$manname =~ m|(.+)\.(.+)|;
31my $mainf = $1;
32my $section = $2;
33die "Bad src file" if !defined $mainf;
34my $podfile = "$srcdir/$mainf.pod";
35#Some pod files are generated and are in the build dir
36unless (-e $podfile) {
37 $podfile = "$builddir/$mainf.pod";
38}
39my %podinfo = extract_pod_info($podfile);
40
41for my $name (@{$podinfo{names}}) {
42 next if $name eq $mainf;
43 if ($action eq "install") {
44 symlink "$manname", "$targetdir/$name.$section";
45 } else {
46 unlink "$targetdir/$name.$section";
47 }
48}
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette