flatcar-scripts/start_devserver
Darin Petkov 16ca07c92e Use PKG_INSTALL_MASK to prevent debug symbols from getting into the binpkg.
The mask is set only if it's not set already. Also, it picks up the default
install mask from common.sh.

BUG=none
TEST=gmerged chromeos-chrome with PKG_INSTALL_MASK set/unset.

Review URL: http://codereview.chromium.org/2907005
2010-07-08 15:17:01 -07:00

43 lines
1.3 KiB
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.
. "$(dirname "$0")/common.sh"
# Script must be run inside the chroot if not in 'always serve' mode.
if [[ "$1" != "--archive_dir" ]]
then
restart_in_chroot_if_needed $*
fi
# Temporary workaround to support requests from update_engine daemon
DEFINE_boolean update_engine $FLAGS_FALSE \
"Start devserver to handle update_engine requests. Default: False"
# Parse command line.
FLAGS "$@" || exit 1
eval set -- "${FLAGS_ARGV}"
set -e
CLIENT_PREFIX=
if [ "${FLAGS_update_engine}" -eq "${FLAGS_TRUE}" ] ; then
echo "!!! devserver will only handle request from update_engine"
# --client_prefix flag is defined in devserver.py
CLIENT_PREFIX="--client_prefix ChromeOSUpdateEngine"
else
echo "!!! devserver will only handle request from memento_updater"
fi
# Set PKG_INSTALL_MASK if it's not set already.
if [ -z "${PKG_INSTALL_MASK+x}" ]; then
export PKG_INSTALL_MASK="${DEFAULT_INSTALL_MASK}"
fi
echo PKG_INSTALL_MASK=$PKG_INSTALL_MASK
cd ${GCLIENT_ROOT}/src/platform/dev && python devserver.py ${CLIENT_PREFIX} $*