mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-10 06:26:57 +02:00
BUG=11507 TEST=Ran and verified that an error is printed. Change-Id: Icc494be4af8c5e3f462363280d5c17c12e16d24d R=cmasone@chromium.org,anush@chromium.org Review URL: http://codereview.chromium.org/6748008
32 lines
990 B
Bash
Executable File
32 lines
990 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
#
|
|
# Simple wrapper script to build a cros_workon package incrementally.
|
|
# You must already be cros_workon'ing the package in question.
|
|
|
|
# --- BEGIN COMMON.SH BOILERPLATE ---
|
|
# Load common CrOS utilities. Inside the chroot this file is installed in
|
|
# /usr/lib/crosutils. Outside the chroot we find it relative to the script's
|
|
# location.
|
|
find_common_sh() {
|
|
local common_paths=(/usr/lib/crosutils "$(dirname "$(readlink -f "$0")")/..")
|
|
local path
|
|
|
|
SCRIPT_ROOT=
|
|
for path in "${common_paths[@]}"; do
|
|
if [ -r "${path}/common.sh" ]; then
|
|
SCRIPT_ROOT=${path}
|
|
break
|
|
fi
|
|
done
|
|
}
|
|
|
|
find_common_sh
|
|
. "${SCRIPT_ROOT}/common.sh" || (echo "Unable to load common.sh" && exit 1)
|
|
# --- END COMMON.SH BOILERPLATE ---
|
|
|
|
die "error: Please run cros_workon_make from chroot:/usr/bin/cros_workon_make"
|