[vlc-devel] commit: Fix zsh completion installer ( Rafaël Carré )
git version control
git at videolan.org
Wed Mar 12 21:19:11 CET 2008
vlc | branch: master | Rafaël Carré <funman at videolan.org> | Wed Mar 12 20:59:18 2008 +0100| [f1c34c38fee6fcfd5751f192f369581b89af7eef]
Fix zsh completion installer
Don't use non-standard extensions
Run the script in zsh
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f1c34c38fee6fcfd5751f192f369581b89af7eef
---
extras/analyser/zsh_completion.sh | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/extras/analyser/zsh_completion.sh b/extras/analyser/zsh_completion.sh
index b49afe0..aecb55e 100755
--- a/extras/analyser/zsh_completion.sh
+++ b/extras/analyser/zsh_completion.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/zsh
# Helper script to install zsh completion for VLC media player
# © 2008 Rafaël Carré <funman at videolanorg>
@@ -47,6 +47,8 @@ done
echo "libvlc found !"
+LD_LIBRARY_PATH=$BUILDDIR/src/.libs
+
if test -e ../../extras/contrib/config.mak -a ! "`grep HOST ../../extras/contrib/config.mak 2>/dev/null|awk '{print $3}'`" != "$HOST"; then
echo "contribs found !"
CPPFLAGS="-I../../extras/contrib/include"
@@ -58,11 +60,10 @@ fi
ZSH_BUILD="$CXX $CPPFLAGS $CXXFLAGS -D__LIBVLC__ -DHAVE_CONFIG_H -I$BUILDDIR -I$BUILDDIR/include -I../../include zsh.cpp $LIBVLC -o zsh_gen"
-echo "Building zsh completion generator ...
-"
+echo "Building zsh completion generator ... "
echo $ZSH_BUILD
echo
-$ZSH_BUILD || exit 1
+eval $ZSH_BUILD || exit 1
echo "Generating zsh completion ..."
if ! ./zsh_gen --plugin-path=$BUILDDIR >_vlc 2>/dev/null; then
@@ -83,7 +84,7 @@ echo "zsh completion is `echo \`wc -l _vlc\`` lines long !"
test -z "$NOINSTALL" || exit 0
#Distributors can run NOINSTALL=mg ./zsh_completion.sh
-if ! /usr/bin/which -s zsh; then
+if ! /usr/bin/which zsh >/dev/null 2>&1; then
echo "ERROR: zsh not found, you'll have to copy the _vlc file manually"
exit 1
fi
More information about the vlc-devel
mailing list