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

set -euo pipefail

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

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)\";"