summaryrefslogtreecommitdiffstats
path: root/src/test/run-cli-tests-maybe-unset-ccache
blob: ba72b06224c53faad46f8234e5d7a4840dbeb2d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
set -e

# ccache breaks if it sees CCACHE_DIR="", yet due to clumsiness of
# /usr/bin/env, it's hard to avoid setting env vars for the parent;
# unset them if they're empty

if [ -z "$CCACHE_DIR" ]; then
   unset CCACHE_DIR
fi

if [ -z "$CC" ]; then
   unset CC
fi

if [ -z "$CXX" ]; then
   unset CXX
fi

exec "$@"