-
Notifications
You must be signed in to change notification settings - Fork 0
/
Hydrunfile
executable file
·39 lines (28 loc) · 906 Bytes
/
Hydrunfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
set -e
# Test
if [ "$1" = "test" ]; then
# Configure Git
git config --global --add safe.directory '*'
# Generate dependencies
make depend
# Run tests
make test
exit 0
fi
# Go
if [ "$1" = "go" ]; then
# Install native dependencies
apt update
apt install -y curl make
# Install bagop
curl -L -o /tmp/bagop "https://github.com/pojntfx/bagop/releases/latest/download/bagop.linux-$(uname -m)"
install /tmp/bagop /usr/local/bin
# Configure Git
git config --global --add safe.directory '*'
# Generate dependencies
make depend
# Build
CGO_ENABLED=0 bagop -j "$(nproc)" -b "$2" -x '(android/*|ios/*|aix/*|plan9/*|illumos/*|dragonfly/*|netbsd/*|openbsd/*|solaris/*|freebsd/(386|arm|riscv64)|js/wasm|linux/(mips|ppc64|riscv64|loong64)|windows/(arm|386)|wasip1/wasm)' -p 'make build/stfs DST=$DST' -d out
exit 0
fi