summaryrefslogtreecommitdiff
path: root/tests/envvar-check
blob: bfc6c79c5c906fb247917727f208545b1a67fa13 (plain)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
  as_unset=unset
else
  as_unset=false
fi

# FIXME-someday: The following is begging to be factored, ...

$as_unset VERSION_CONTROL SIMPLE_BACKUP_SUFFIX
$as_unset BLOCK_SIZE DU_BLOCK_SIZE DF_BLOCK_SIZE LS_BLOCK_SIZE

if test "${VERSION_CONTROL+set}" = set; then
  echo "$0: the VERSION_CONTROL envvar is set --" \
    ' unset it and rerun this test' >&2
  envvar_check_fail=1
fi

if test "${SIMPLE_BACKUP_SUFFIX+set}" = set; then
  echo "$0: the SIMPLE_BACKUP_SUFFIX envvar is set --" \
    ' unset it and rerun this test' >&2
    >&2
  envvar_check_fail=1
fi

if test "${BLOCK_SIZE+set}" = set; then
  echo "$0: the BLOCK_SIZE envvar is set --" \
    ' unset it and rerun this test' >&2
    >&2
  envvar_check_fail=1
fi

if test "${DU_BLOCK_SIZE+set}" = set; then
  echo "$0: the DU_BLOCK_SIZE envvar is set --" \
    ' unset it and rerun this test' >&2
    >&2
  envvar_check_fail=1
fi

if test "${DF_BLOCK_SIZE+set}" = set; then
  echo "$0: the DF_BLOCK_SIZE envvar is set --" \
    ' unset it and rerun this test' >&2
    >&2
  envvar_check_fail=1
fi

if test "${LS_BLOCK_SIZE+set}" = set; then
  echo "$0: the LS_BLOCK_SIZE envvar is set --" \
    ' unset it and rerun this test' >&2
    >&2
  envvar_check_fail=1
fi

test "$envvar_check_fail" = 1 && exit 1