blob: 6afd4ceb3a8317bbbc93ce272a8edbbd592a04b3 [file] [log] [blame] [edit]
#!/bin/bash
# Copyright 2018 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#### CATEGORY=Software delivery
### start the update server and attach to a running fuchsia device
## usage: fx serve-updates [-v] [-l host[:port]] [-c version] [--no-auto-config] [--name NAME]
##
## -l host:port host and port that "pm serve" will listen on
## -c version configuration format version for the served config.json
## that "pm" will serve. Valid choices: 1 or 2.
## Choosing `1` will serve a file which can be processed by
## `pkgctl repo add ... -f 1`.
## Choosing `2` will serve a file which can be processed by
## `pkgctl repo ...` without the `-f 1` switch.
## --no-auto-config do not configure this host as a package server on the device
## --name NAME Name the generated update source config NAME.
## --[no-]persist enable or disable persistence of repository metadata. Disabled
## by default.
## -v verbose mode, shows info and debug messages from "pm"
## -C|--clean clean the package repository first. This flag is only
## valid if the incremental package publishing is enabled.
##
## This command supports incremental package publishing. If enabled, it will
## auto-publish packages as they are created or modified.
##
## To enable incremental package serving, run "fx --enable=incremental serve-updates ..."
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"/lib/vars.sh || exit $?
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"/lib/fx-optional-features.sh || exit $?
fx-config-read
fx-warn "'fx serve-updates' is deprecated. Please switch to 'fx serve'."
sleep 1
fx-command-exec serve "$@"