blob: 3c733e59a0bf3f7ca7bded006fb3964987022bdb [file] [log] [blame]
Zdenek Behan9ca79432011-02-06 18:41:10 +01001#!/bin/bash
2
3# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
4# Use of this source code is governed by a BSD-style license that can be
5# found in the LICENSE file.
6
7# Start the Dev Server after making sure we are running under a chroot.
David James7c2e2f72012-07-10 10:17:10 -07008. /usr/lib/crosutils/common.sh || exit 1
Zdenek Behan9ca79432011-02-06 18:41:10 +01009
10# Script must be run inside the chroot if not in 'always serve' mode.
11if [[ "$1" != "--archive_dir" ]]; then
12 restart_in_chroot_if_needed "$@"
13fi
14
David Jamesed079b12011-05-17 14:53:15 -070015export DEFAULT_INSTALL_MASK
Zdenek Behan9ca79432011-02-06 18:41:10 +010016
Chris Sosa6039a402012-03-26 15:13:40 -070017if [ -f /usr/lib/devserver/devserver.py ]; then
18 python /usr/lib/devserver/devserver.py "$@"
19else
20 python /usr/bin/devserver.py "$@"
21fi