xref: /aosp_15_r20/external/libtraceevent/Documentation/install-docs.sh.in (revision 436bf2bcd5202612ffffe471bbcc1f277cc8d28e)
1#!/bin/bash
2# SPDX-License-Identifier: LGPL-2.1
3#
4# Copyright (c) 2023 Daniel Wagner, SUSE LLC
5
6for section in 1 3 5; do
7    while IFS= read -r -d '' man; do
8        [ ! -d "${DESTDIR}@MANDIR@/man${section}" ] && install -d "${DESTDIR}@MANDIR@/man${section}"
9
10        echo Installing "${man}" to "${DESTDIR}@MANDIR@/man${section}"
11        install -m 0644 "${man}" "${DESTDIR}@MANDIR@/man${section}/"
12    done< <(find "@SRCDIR@" -name "*\.${section}" -type f -print0)
13done
14
15while IFS= read -r -d '' html; do
16    [ ! -d "${DESTDIR}@HTMLDIR@"  ] && install -d "${DESTDIR}@HTMLDIR@"
17
18    echo Installing "${html}" to "${DESTDIR}@HTMLDIR@"
19    install -m 0644 "${html}" "${DESTDIR}@HTMLDIR@"
20done< <(find "@SRCDIR@" -name "*\.html" -type f -print0)
21