vman: respect target name even if it doesn't contain language code

This commit is contained in:
Dominik Honnef 2014-07-06 23:15:30 +02:00
parent e123839dd6
commit 89b6aac74a
1 changed files with 3 additions and 3 deletions

View File

@ -29,7 +29,7 @@ _vbin() {
}
_vman() {
local file="$1" target="${2:-$1}"
local file="$1" target="${2:-${1##*/}}"
if [ $# -lt 1 ]; then
msg_red "$pkgver: vman: 1 argument expected: <file>\n"
@ -40,10 +40,10 @@ _vman() {
if [[ $target =~ (.*)\.([a-z][a-z](_[A-Z][A-Z])?)\.(.*) ]]
then
name=${BASH_REMATCH[1]##*/}.${BASH_REMATCH[4]}
name=${BASH_REMATCH[1]}.${BASH_REMATCH[4]}
mandir=${BASH_REMATCH[2]}/man${suffix:0:1}
else
name=${name##*/}
name=$target
mandir=man${suffix:0:1}
fi