Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Commit

Permalink
tools/install-manpages: improve echoing.
Browse files Browse the repository at this point in the history
Without locale, change echoing from:

    .../usr/local/man//man1
    .../usr/local/man//man1/pdf2djvu.1

to:

    .../usr/local/man/man1
    .../usr/local/man/man1/pdf2djvu.1
  • Loading branch information
samy-mahmoudi authored and jwilk committed Mar 5, 2019
1 parent 58f50ad commit 5f7e013
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tools/install-manpages
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,19 @@ do
basename=$(basename "$manpage")
suffix=${basename#*.}
locale=${suffix%.*}
[ "$locale" = "$suffix" ] && locale=
if [ "$locale" = "$suffix" ]
then
locale=
else
locale=${locale}/
fi
section=${suffix#*.}
basename=${basename%%.*}
(
PS4='$ '
set -x
$INSTALL -d "$mandir/$locale/man$section"
$INSTALL -m 644 "$manpage" "$mandir/$locale/man$section/$basename.$section"
$INSTALL -d "$mandir/${locale}man$section"
$INSTALL -m 644 "$manpage" "$mandir/${locale}man$section/$basename.$section"
)
done

Expand Down

0 comments on commit 5f7e013

Please sign in to comment.