blob: 60e91f2458d126f40660e35e543558431e4fcf63 [file] [log] [blame]
# Copyright (c) 2012 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.
# This is to clear the build roots for all boards to cope with a
# toolchain revert.
for board_root in /build/* ; do
board=${board_root##*/}
emerge_board=$(type -P emerge-${board} 2>/dev/null || true)
if [[ -x "${emerge_board}" ]]; then
# It is a valid baord.
build="/build/${board}"
if [[ -d ${build} ]] ; then
# The board has a build root to clear.
info "Deleting ${board} build root at ${build}"
sudo rm -rf --one-file-system ${build}
info "Running setup_board --board=${board}"
~/trunk/src/scripts/setup_board --board=${board} --skip_chroot_upgrade
fi
fi
done
# Delete Chrome artifacts.
sudo rm -rf --one-file-system /var/cache/chromeos-chrome/* || true