File: get-dart.sh

package info (click to toggle)
pre-commit 4.5.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,452 kB
  • sloc: python: 14,482; sh: 87; makefile: 4
file content (17 lines) | stat: -rwxr-xr-x 544 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env bash
set -euo pipefail

VERSION=2.19.6

if [ "$OSTYPE" = msys ]; then
    URL="https://storage.googleapis.com/dart-archive/channels/stable/release/${VERSION}/sdk/dartsdk-windows-x64-release.zip"
    cygpath -w /tmp/dart-sdk/bin >> "$GITHUB_PATH"
else
    URL="https://storage.googleapis.com/dart-archive/channels/stable/release/${VERSION}/sdk/dartsdk-linux-x64-release.zip"
    echo '/tmp/dart-sdk/bin' >> "$GITHUB_PATH"
fi

curl --silent --location --output /tmp/dart.zip "$URL"

unzip -q -d /tmp /tmp/dart.zip
rm /tmp/dart.zip