function exit_error {
  for msg in "$@"
  do
    echo "$msg" > /dev/stderr
  done
  exit 1
}

function var_is_defined {
  for var in "$@"
  do
    test -n "${!var}" || exit_error "$var is not defined (see set-config* files)"
  done
}

function check_torbrowser_version_var {
  local tbver=$("$script_dir/../../rbm/rbm" showconf tor-browser var/torbrowser_version)
  test "$tbver" != "$tbb_version" && exit_error "Wrong tbb_version: $tbver != $tbb_version"
  return 0
}

. "$script_dir/set-config"
