#!/bin/bash set -e version_lt() { test "$(printf '%s\n' "$@" | { [ "$(uname)" = "Linux" ] && sort -V || sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n; } | tail -n 1)" != "$1"; } # run command at repo root CURRENT_PATH=$PWD if [ -d .git ]; then cd "$(git rev-parse --show-toplevel)" fi if ! type yarn > /dev/null then cat << EOF FATAL: Yarn could not be found. Please follow the official installation instructions at https://classic.yarnpkg.com/en/docs/install and try again. EOF exit 1 fi if version_lt "$(yarn --version)" '1.22.0'; then cat <