mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-08 13:36:58 +02:00
This script is a bit of mess in general as it copies client directories back onto client proper. This creates issues when you add additional directories that might exist in client to base that either the FACTORY_TEST_INSTALL_MASK isn't expecting. BUG=chromium-os:26561 TEST=Ran build_image factory_test with/without packages directory. Change-Id: I692d44f7c56668d689350d0f3a2a2c2790c6c13a Reviewed-on: https://gerrit.chromium.org/gerrit/17713 Tested-by: Chris Sosa <sosa@chromium.org> Reviewed-by: Scott Zawalski <scottz@chromium.org> Commit-Ready: Chris Sosa <sosa@chromium.org>
20 lines
673 B
Bash
Executable File
20 lines
673 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Copyright (c) 2011 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.
|
|
|
|
die() {
|
|
echo "ERROR: $*"
|
|
exit 1
|
|
}
|
|
|
|
echo "Rebasing autotest/client folder for factory."
|
|
base_dir="${ROOT_FS_DIR}/usr/local/autotest"
|
|
|
|
[ -d "${base_dir}/client" ] || die "Missing client in root: ${base_dir}"
|
|
rm -rf ${base_dir}/packages || die "Failed to wipe packages directory."
|
|
mv "${base_dir}/client/"* "${base_dir}" || die "Failed moving client folder."
|
|
rmdir "${base_dir}/client" || die "Failed removing client folder."
|
|
ln -s . "${base_dir}/client" || die "Failed creating symlink."
|