mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-07 13:06:59 +02:00
Add restart_in_chroot_if_needed to common.sh, and modify the build scripts which referred to assert_inside_chroot to use it instead. The effect is that you don't ever have to explicitly enter_chroot.sh to build (still can, it work's fine). Update mod_image_for_test.sh to use restart_in_chroot_if_needed Review URL: http://codereview.chromium.org/1736025
19 lines
506 B
Bash
Executable File
19 lines
506 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.
|
|
|
|
# Start the Dev Server after making sure we are running under a chroot.
|
|
|
|
COMMON_SH="$(dirname "$0")/common.sh"
|
|
. "$COMMON_SH"
|
|
|
|
# Script must be run inside the chroot if not in 'always serve' mode.
|
|
if [[ "$1" != "-a" ]]
|
|
then
|
|
restart_in_chroot_if_needed $*
|
|
fi
|
|
|
|
cd ${GCLIENT_ROOT}/src/platform/dev && python devserver.py $*
|