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