summaryrefslogtreecommitdiffstats
path: root/build/msg-if.sh
blob: e0d0957f93b3328ac4c33d1914e0ad27d4fd9dda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

# Copyright © Tavian Barnes <tavianator@tavianator.com>
# SPDX-License-Identifier: 0BSD

# Print a success/failure indicator from a makefile:
#
#     $ ./configure
#     [ CC ] with/liburing.c                 ✘
#     [ CC ] with/oniguruma.c                ✔

set -eu

MSG="$1"
shift

if "$@"; then
    build/msg.sh "$(printf '%-37s  ✔' "$MSG")"
else
    build/msg.sh "$(printf '%-37s  ✘' "$MSG")"
fi