2019-04-04 11:33:38 +03:00
|
|
|
#!/usr/bin/env bash
|
2020-03-27 03:26:10 +03:00
|
|
|
# Copyright (c) 2020 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
2019-04-04 11:33:38 +03:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
SCRIPT_DIR=$(dirname "$0")
|
|
|
|
cd $SCRIPT_DIR
|
|
|
|
BUILD_DIR=$(cd ..; pwd)/build
|
|
|
|
|
|
|
|
trap cleanup 1 2 3 6
|
|
|
|
|
|
|
|
cleanup()
|
|
|
|
{
|
|
|
|
echo "Caught Signal ... cleaning up."
|
|
|
|
rm -rf $BUILD_DIR
|
|
|
|
echo "Done cleanup ... quitting."
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
rm -rf $BUILD_DIR
|
|
|
|
mkdir $BUILD_DIR
|
|
|
|
|
2020-09-16 15:12:59 +03:00
|
|
|
bazel build //docs:docs-no-pdf
|
|
|
|
tar -zxf ../../bazel-bin/docs/html-only.tar.gz -C $BUILD_DIR
|
2019-04-04 11:33:38 +03:00
|
|
|
cd $BUILD_DIR/html
|
2020-09-16 15:12:59 +03:00
|
|
|
python -m http.server 8000 --bind 127.0.0.1
|