about summary refs log tree commit diff stats
path: root/mu
blob: ad3222d9fc0f77b5a619b74578ddf4972f826051 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
#
# Compile mu if necessary before running it.

# I try to keep this script working even on a minimal OpenBSD without bash.
# In such situations you might sometimes need GNU make.
which gmake >/dev/null 2>&1 && export MAKE=gmake || export MAKE=make

# show make output only if something needs doing
$MAKE -q || $MAKE >&2 || exit 1

./mu_bin $FLAGS "$@"

# Scenarios considered:
#   mu
#   mu --help
#   mu test
#   mu test file1.mu