mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-12-28 16:15:02 +01:00
32031 plus missed _run_help: get helpfiles install path corect in functions
This commit is contained in:
parent
8e2d4c2cf7
commit
9503b161ab
7 changed files with 31 additions and 6 deletions
|
@ -1,3 +1,10 @@
|
|||
2013-11-23 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||
|
||||
* 32031 plus missed _run_help: Completion/Zsh/Command/_run-help,
|
||||
Config/defs.mk.in, Config/installfns.sh, Doc/Makefile.in,
|
||||
Functions/Misc/run-help, Makefile.in: turn @runhelpdir@ in
|
||||
installed functions into the actual installation path.
|
||||
|
||||
2013-11-20 Peter Stephenson <p.stephenson@samsung.com>
|
||||
|
||||
* 32030: revert 31995 as it caused (N) to fail on an empty
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#compdef run-help
|
||||
local d expl
|
||||
local HELPDIR=${HELPDIR:-/usr/share/zsh/$ZSH_VERSION/help}
|
||||
local HELPDIR=${HELPDIR:-@runhelpdir@}
|
||||
[[ -d $HELPDIR ]] && {
|
||||
d=($HELPDIR/*(:t))
|
||||
(($#d)) && d+=('.' ':') && _wanted commands expl 'command' compadd -a d
|
||||
|
|
|
@ -51,6 +51,7 @@ sitefndir = @sitefndir@
|
|||
scriptdir = @scriptdir@
|
||||
sitescriptdir = @sitescriptdir@
|
||||
htmldir = @htmldir@
|
||||
runhelpdir = @runhelpdir@
|
||||
|
||||
# compilation
|
||||
CC = @CC@
|
||||
|
|
|
@ -10,6 +10,8 @@ allfuncs="`grep ' functions=.' ${dir_top}/config.modules |
|
|||
|
||||
allfuncs="`cd $sdir_top; echo ${allfuncs}`"
|
||||
|
||||
test -d installfnsdir || mkdir installfnsdir
|
||||
|
||||
# We now have a list of files, but we need to use `test -f' to check
|
||||
# (1) the glob got expanded (2) we are not looking at directories.
|
||||
for file in $allfuncs; do
|
||||
|
@ -44,8 +46,22 @@ for file in $allfuncs; do
|
|||
;;
|
||||
esac
|
||||
fi
|
||||
test -d $instdir || /bin/sh $sdir_top/mkinstalldirs $instdir || exit 1
|
||||
$INSTALL_DATA $sdir_top/$file $instdir || exit 1
|
||||
basename=`basename $file`
|
||||
ok=0
|
||||
if test -d $instdir || /bin/sh $sdir_top/mkinstalldirs $instdir; then
|
||||
if sed "s|@runhelpdir@|$runhelpdir|" <$sdir_top/$file \
|
||||
>installfnsdir/$basename; then
|
||||
if $INSTALL_DATA installfnsdir/$basename $instdir; then
|
||||
ok=1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
case $ok in
|
||||
0)
|
||||
rm -rf installfnsdir
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
read line < $sdir_top/$file
|
||||
case "$line" in
|
||||
'#!'*)
|
||||
|
@ -54,3 +70,5 @@ for file in $allfuncs; do
|
|||
esac
|
||||
fi
|
||||
done
|
||||
|
||||
rm -rf installfnsdir
|
||||
|
|
|
@ -33,7 +33,6 @@ dir_top = ..
|
|||
VPATH = @srcdir@
|
||||
sdir = @srcdir@
|
||||
sdir_top = @top_srcdir@
|
||||
runhelpdir = @runhelpdir@
|
||||
INSTALL = @INSTALL@
|
||||
LN_S = @LN_S@
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
emulate -RL zsh
|
||||
|
||||
local HELPDIR="${HELPDIR:-/usr/share/zsh/$ZSH_VERSION/help}"
|
||||
local HELPDIR="${HELPDIR:-@runhelpdir@}"
|
||||
|
||||
[[ $1 == "." ]] && 1="dot"
|
||||
[[ $1 == ":" ]] && 1="colon"
|
||||
|
|
|
@ -88,7 +88,7 @@ install.fns:
|
|||
test x$(sitefndir) != xno && \
|
||||
$(SHELL) $(sdir_top)/mkinstalldirs $(DESTDIR)$(sitefndir); \
|
||||
sdir_top="$(sdir_top)" fndir="$(fndir)" dir_top="$(dir_top)" \
|
||||
scriptdir="$(scriptdir)" \
|
||||
scriptdir="$(scriptdir)" runhelpdir="$(runhelpdir)" \
|
||||
FUNCTIONS_SUBDIRS="$(FUNCTIONS_SUBDIRS)" \
|
||||
INSTALL_DATA="$(INSTALL_DATA)" \
|
||||
INSTALL_PROGRAM="$(INSTALL_PROGRAM)" \
|
||||
|
|
Loading…
Reference in a new issue