summary refs log tree commit diff stats
path: root/update-tabnine.sh
blob: 19fe45df8a2d2f2e395b78a136439a674e1ee7b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

function prefetch_target () {
  nix-prefetch-url --type sha256 https://update.tabnine.com/$2/$1/TabNine 2> /dev/null
}

if [ -z "$1" ]; then
  echo "Usage: $0 <version>"
  exit 1
fi

echo "
sha256 = if stdenv.isDarwin then
\"$(prefetch_target x86_64-apple-darwin $1)\"
else
\"$(prefetch_target x86_64-unknown-linux-musl $1)\";"