1
1
mirror of https://github.com/codota/TabNine.git synced 2024-09-11 09:55:23 +03:00
TabNine/dl_binaries.sh
Henrik Lindgren 44756fbc7b
make dl_binaries.sh work
made dl_binaries.sh more posix compliant.
added double ticks to prevent word splitting.
2019-07-31 22:35:43 +02:00

26 lines
639 B
Bash
Executable File

#!/bin/sh
set -e
# This script downloads the binaries for the most recent version of TabNine.
version="$(curl -sS https://update.tabnine.com/version)"
targets='i686-apple-darwin
x86_64-apple-darwin
x86_64-unknown-linux-gnu
x86_64-pc-windows-gnu
i686-unknown-linux-gnu
i686-pc-windows-gnu'
echo "$targets" | while read target
do
mkdir -p binaries/$version/$target
case $target in
*windows*) exe=TabNine.exe ;;
*) exe=TabNine ;;
esac
path=$version/$target/$exe
echo "downloading $path"
curl -sS https://update.tabnine.com/$path > binaries/$path
chmod +x binaries/$path
done