blob: 23b64e2f0c33da39421495862ab68a3ac97fd84a [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.
# Newer crossdev will create a metadata layout for us, but the older one used
# a symlink for the dir, and crossdev won't auto-migrate for us. Delete the
# symlink and automatically seed a file that crossdev will update itself. We
# can't just delete the symlink and wait for setup_board to run as that will
# break the metadata lookup needed by the cross-compilers in the meantime.
if [[ ! -d ${dir} || ! -L ${dir}/metadata ]] ; then
# Nothing for us to do. Great! (?)
exit 0
set -e
cd "${dir}"
sudo rm -f metadata
sudo mkdir metadata
sudo_clobber metadata/layout.conf <<-EOF
# Autogenerated and managed by crossdev
# Delete the above line if you want to manage this file yourself
masters = chromiumos portage-stable
exit 0