From f1c34c38fee6fcfd5751f192f369581b89af7eef Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C3=ABl=20Carr=C3=A9?= Date: Wed, 12 Mar 2008 20:59:18 +0100 Subject: [PATCH] Fix zsh completion installer Don't use non-standard extensions Run the script in zsh --- extras/analyser/zsh_completion.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/extras/analyser/zsh_completion.sh b/extras/analyser/zsh_completion.sh index b49afe0631..aecb55e074 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é @@ -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 -- 2.39.5