mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-09 05:56:58 +02:00
Replace calls to restart_in_chroot_if_needed with assert_inside_chroot. This removes a dependency on chromite.
18 lines
579 B
Bash
Executable File
18 lines
579 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.
|
|
|
|
SCRIPT_ROOT=$(dirname $(readlink -f "$0"))
|
|
. "${SCRIPT_ROOT}/common.sh" || exit 1
|
|
|
|
# Script must be run inside the chroot if not in 'always serve' mode.
|
|
if [[ "$1" != "--archive_dir" ]]; then
|
|
assert_inside_chroot
|
|
fi
|
|
|
|
# This is the location of the script now.
|
|
exec $(dirname ${0})/../../chroot/usr/bin/start_devserver "$@"
|