File: run.sh

package info (click to toggle)
node-v8-compile-cache 2.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 276 kB
  • sloc: javascript: 888; sh: 21; makefile: 2
file content (17 lines) | stat: -rwxr-xr-x 435 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

set -eo pipefail

THIS_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
: "${NODE_BIN:=node}"

if [ "$(/usr/bin/arch)" != "arm64" ]; then
  echo "arch/run.sh: This must be run on Apple Silicon." >&2
  exit
fi

# shellcheck disable=SC2016
"$NODE_BIN" "$THIS_DIR/yarn.js" config get init.author.name >/dev/null
/usr/bin/arch -x86_64 "$NODE_BIN" "$THIS_DIR/yarn.js" config get init.author.name >/dev/null

echo "Success!"