File: install-man-pages.sh

package info (click to toggle)
tilix 1.9.5-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,200 kB
  • sloc: xml: 1,175; sh: 285; python: 127; perl: 72; ansic: 53; makefile: 9
file content (24 lines) | stat: -rw-r--r-- 665 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/env sh

# Determine PREFIX.
if [ -z "$1" ]; then
    if [ -n "$PREFIX" ]; then
        PREFIX='/usr'
    fi
else
    PREFIX="$1"
fi
export PREFIX

echo "Installing man pages"
install -Dm 644 'data/man/tilix.1' "$PREFIX/share/man/man1/tilix.1"
gzip -f "$PREFIX/share/man/man1/tilix.1"

if type po4a-translate >/dev/null 2>&1; then
    for f in data/man/po/*.man.po; do
        LOCALE=$(basename "$f" .man.po)
        install -d "$PREFIX/share/man/$LOCALE/man1"
        po4a-translate -k 0 -f man -m data/man/tilix -p "data/man/po/$LOCALE.man.po" -l "$PREFIX/share/man/$LOCALE/man1/tilix.1"
        gzip -f "$PREFIX/share/man/$LOCALE/man1/tilix.1"
    done
fi