File: install-docs.sh.in

package info (click to toggle)
libtracefs 1.8.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,368 kB
  • sloc: ansic: 12,953; makefile: 609; sh: 509; yacc: 188; lex: 106
file content (20 lines) | stat: -rwxr-xr-x 744 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
# SPDX-License-Identifier: LGPL-2.1
#
# Copyright (c) 2023 Daniel Wagner, SUSE LLC

for section in 1 3 5; do
    while IFS= read -r -d '' man; do
        [ ! -d "${DESTDIR}@MANDIR@/man${section}" ] && install -d "${DESTDIR}@MANDIR@/man${section}"

        echo Installing "${man}" to "${DESTDIR}@MANDIR@/man${section}"
        install -m 0644 "${man}" "${DESTDIR}@MANDIR@/man${section}/"
    done< <(find "@SRCDIR@" -name "*\.${section}" -type f -print0)
done

while IFS= read -r -d '' html; do
    [ ! -d "${DESTDIR}@HTMLDIR@"  ] && install -d "${DESTDIR}@HTMLDIR@"

    echo Installing "${html}" to "${DESTDIR}@HTMLDIR@"
    install -m 0644 "${html}" "${DESTDIR}@HTMLDIR@"
done< <(find "@SRCDIR@" -name "*\.html" -type f -print0)