• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env bash
2
3# Copyright 2020 The ChromiumOS Authors
4# Use of this source code is governed by a BSD-style license that can be
5# found in the LICENSE file.
6
7# Common bash functions used for configuration generation and transforms.
8function summarize() {
9  # shellcheck disable=SC2181
10  if [[ $? -eq 0 ]]; then
11    echo "Config generation step succeeded"
12  else
13    echo "Config generation step failed!!!" >&2
14  fi
15}
16
17function config_usage() {
18  echo "Usage: $0 [options] <config_file>" >&2
19  echo "  where <config_file> is a main starlark" >&2
20  echo "  configuration file, typically config.star" >&2
21  echo
22  echo "Options:"
23  echo "  --output-dir/-o <dir> - Directory to write output to (default cwd)"
24  exit 1
25}
26