aboutsummaryrefslogtreecommitdiff
path: root/common/make.sh
blob: f103167d9d579717548e69de7827c1a90f1e0f5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env bash
set -euo pipefail

NAME=$1
TARGET=$2

WORKDIR="/tmp/${NAME}"

cleanup() {
	rm -rf "${WORKDIR}"
}

trap cleanup EXIT

(cd "${WORKDIR}" && make "${TARGET}")

trap - EXIT