mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-18 15:21:16 +02: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>
|
2013-11-20 Peter Stephenson <p.stephenson@samsung.com>
|
||||||
|
|
||||||
* 32030: revert 31995 as it caused (N) to fail on an empty
|
* 32030: revert 31995 as it caused (N) to fail on an empty
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#compdef run-help
|
#compdef run-help
|
||||||
local d expl
|
local d expl
|
||||||
local HELPDIR=${HELPDIR:-/usr/share/zsh/$ZSH_VERSION/help}
|
local HELPDIR=${HELPDIR:-@runhelpdir@}
|
||||||
[[ -d $HELPDIR ]] && {
|
[[ -d $HELPDIR ]] && {
|
||||||
d=($HELPDIR/*(:t))
|
d=($HELPDIR/*(:t))
|
||||||
(($#d)) && d+=('.' ':') && _wanted commands expl 'command' compadd -a d
|
(($#d)) && d+=('.' ':') && _wanted commands expl 'command' compadd -a d
|
||||||
|
|
|
@ -51,6 +51,7 @@ sitefndir = @sitefndir@
|
||||||
scriptdir = @scriptdir@
|
scriptdir = @scriptdir@
|
||||||
sitescriptdir = @sitescriptdir@
|
sitescriptdir = @sitescriptdir@
|
||||||
htmldir = @htmldir@
|
htmldir = @htmldir@
|
||||||
|
runhelpdir = @runhelpdir@
|
||||||
|
|
||||||
# compilation
|
# compilation
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
|
|
|
@ -10,6 +10,8 @@ allfuncs="`grep ' functions=.' ${dir_top}/config.modules |
|
||||||
|
|
||||||
allfuncs="`cd $sdir_top; echo ${allfuncs}`"
|
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
|
# 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.
|
# (1) the glob got expanded (2) we are not looking at directories.
|
||||||
for file in $allfuncs; do
|
for file in $allfuncs; do
|
||||||
|
@ -44,8 +46,22 @@ for file in $allfuncs; do
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
test -d $instdir || /bin/sh $sdir_top/mkinstalldirs $instdir || exit 1
|
basename=`basename $file`
|
||||||
$INSTALL_DATA $sdir_top/$file $instdir || exit 1
|
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
|
read line < $sdir_top/$file
|
||||||
case "$line" in
|
case "$line" in
|
||||||
'#!'*)
|
'#!'*)
|
||||||
|
@ -54,3 +70,5 @@ for file in $allfuncs; do
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
rm -rf installfnsdir
|
||||||
|
|
|
@ -33,7 +33,6 @@ dir_top = ..
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
sdir = @srcdir@
|
sdir = @srcdir@
|
||||||
sdir_top = @top_srcdir@
|
sdir_top = @top_srcdir@
|
||||||
runhelpdir = @runhelpdir@
|
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
LN_S = @LN_S@
|
LN_S = @LN_S@
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
emulate -RL zsh
|
emulate -RL zsh
|
||||||
|
|
||||||
local HELPDIR="${HELPDIR:-/usr/share/zsh/$ZSH_VERSION/help}"
|
local HELPDIR="${HELPDIR:-@runhelpdir@}"
|
||||||
|
|
||||||
[[ $1 == "." ]] && 1="dot"
|
[[ $1 == "." ]] && 1="dot"
|
||||||
[[ $1 == ":" ]] && 1="colon"
|
[[ $1 == ":" ]] && 1="colon"
|
||||||
|
|
|
@ -88,7 +88,7 @@ install.fns:
|
||||||
test x$(sitefndir) != xno && \
|
test x$(sitefndir) != xno && \
|
||||||
$(SHELL) $(sdir_top)/mkinstalldirs $(DESTDIR)$(sitefndir); \
|
$(SHELL) $(sdir_top)/mkinstalldirs $(DESTDIR)$(sitefndir); \
|
||||||
sdir_top="$(sdir_top)" fndir="$(fndir)" dir_top="$(dir_top)" \
|
sdir_top="$(sdir_top)" fndir="$(fndir)" dir_top="$(dir_top)" \
|
||||||
scriptdir="$(scriptdir)" \
|
scriptdir="$(scriptdir)" runhelpdir="$(runhelpdir)" \
|
||||||
FUNCTIONS_SUBDIRS="$(FUNCTIONS_SUBDIRS)" \
|
FUNCTIONS_SUBDIRS="$(FUNCTIONS_SUBDIRS)" \
|
||||||
INSTALL_DATA="$(INSTALL_DATA)" \
|
INSTALL_DATA="$(INSTALL_DATA)" \
|
||||||
INSTALL_PROGRAM="$(INSTALL_PROGRAM)" \
|
INSTALL_PROGRAM="$(INSTALL_PROGRAM)" \
|
||||||
|
|
Loading…
Reference in a new issue