[build]
publish = "target/doc"
command = """
set -ex
packages=('libapt-pkg-dev::https://mirrors.kernel.org/ubuntu/pool/main/a/apt/libapt-pkg-dev_2.4.5_amd64.deb')
export CPLUS_INCLUDE_PATH="${PWD}/usr/include"
for pkg in "${packages[@]}"; do
pkgname="$(echo "${pkg}" | sed 's|::.*||')"
url="$(echo "${pkg}" | sed 's|.*::||')"
wget "${url}"
ar xf "${pkgname}"_*.deb
zstd -df data.tar.zst
tar -xf data.tar
done
rustup toolchain install stable
cargo doc --no-deps
# Redirect the root URL to the rust_apt docs.
echo '<html><head><meta http-equiv="refresh" content="0; URL=/rust_apt" /></head></html>' > target/doc/index.html
"""