install crystal zsh completion

This commit is contained in:
Gwenhael Le Moine 2018-12-05 10:38:16 +01:00
parent 479f5e6c9b
commit d19d0f4969
No known key found for this signature in database
GPG key ID: FDFE3669426707A7
2 changed files with 7 additions and 3 deletions

1
.gitignore vendored
View file

@ -34,3 +34,4 @@ a/linux/patches/
xap/st/patches/st-scrollback* xap/st/patches/st-scrollback*
xap/st/patches/st-vertcenter* xap/st/patches/st-vertcenter*
*.rpm *.rpm
/d/crystal/completion.zsh

View file

@ -5,7 +5,7 @@ CWD=$(pwd)
PRGNAM=$(basename $CWD) PRGNAM=$(basename $CWD)
ARCH=$(uname -m) ARCH=$(uname -m)
BUILD=4 BUILD=5
TAG=cyco TAG=cyco
OUTPUT=/tmp OUTPUT=/tmp
@ -20,8 +20,11 @@ CLEAN_VERSION=$(echo $VERSION | tr '-' '_')
# cleaning # cleaning
rm -fr $PKG rm -fr $PKG
# download
[ ! -e $CWD/crystal-${VERSION}-linux-${ARCH}.tar.gz ] && wget -c https://github.com/manastech/crystal/releases/download/$(echo $VERSION | grep -o "[0-9.]*" | head -n1)/crystal-${VERSION}-linux-${ARCH}.tar.gz -O $CWD/crystal-${VERSION}-linux-${ARCH}.tar.gz [ ! -e $CWD/crystal-${VERSION}-linux-${ARCH}.tar.gz ] && wget -c https://github.com/manastech/crystal/releases/download/$(echo $VERSION | grep -o "[0-9.]*" | head -n1)/crystal-${VERSION}-linux-${ARCH}.tar.gz -O $CWD/crystal-${VERSION}-linux-${ARCH}.tar.gz
[ ! -e $CWD/completion.zsh ] && wget -c https://raw.githubusercontent.com/crystal-lang/crystal/master/etc/completion.zsh -O $CWD/completion.zsh
# installation # installation
mkdir -p $PKG mkdir -p $PKG
cd $PKG cd $PKG
@ -32,8 +35,8 @@ mv $PKG$PREFIX/share/doc $PKG$PREFIX/doc/$PRGNAM
mv $PKG$PREFIX/share/licenses $PKG$PREFIX/doc/$PRGNAM mv $PKG$PREFIX/share/licenses $PKG$PREFIX/doc/$PRGNAM
mv $PKG$PREFIX/share/man $PKG$PREFIX/ mv $PKG$PREFIX/share/man $PKG$PREFIX/
# mkdir -p $PKG$PREFIX/share/zsh/site-functions/ mkdir -p $PKG$PREFIX/share/zsh/site-functions/
# cp -R $PKG$PREFIX/doc/crystal-${CLEAN_VERSION}/etc/completion.zsh $PKG$PREFIX/share/zsh/site-functions/_crystal cp -R $CWD/completion.zsh $PKG$PREFIX/share/zsh/site-functions/_crystal
# sed -i "s|INSTALL_DIR=.*|INSTALL_DIR=$PREFIX/libexec/$PRGNAM|g" $PKG$PREFIX/bin/crystal # sed -i "s|INSTALL_DIR=.*|INSTALL_DIR=$PREFIX/libexec/$PRGNAM|g" $PKG$PREFIX/bin/crystal