#! /bin/bash
#
# Available environment variables:
# CONF		Configuration file
# DIST		Distribution name
# SECTIONS	Sections available in DIST
# ARCHS		Architectures available in DIST
# GPGKEY	UpdateRepository::Release::GpgKey
# KEYRING	Keyring filename without path and extension
# KEYRING_DEB	Keyring debian package path and filename
# URL		UpdateRepository::URL
# ARCHIVE_URL	URL of archived repository
# IMPRESSUM_URL URL of the impressum
# EMAIL_URL	E-mail address or URL for e-mails
# MAINTAINER	Maintainer of the repository
# ORIGIN	APT::FTPArchive::Release::Origin
# LABEL		APT::FTPArchive::Release::Label
# DESCRIPTION	APT::FTPArchive::Release::Description
# EXAMPLE	One package name available in DIST
# SIGNED_BY	Returns false if sources.list does not support signed-by option
#
cat << EOF
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>$DESCRIPTION for Debian ${DIST%-*}</title>
    <link rel="stylesheet" href="../../conf/style.css">
  </head>
  <body class='readme-release'>
    <h1>$DESCRIPTION for Debian <b><u>${DIST%-*}</u></b></h1>

    <p>To enable this repository, run:</p>

    <code>
        apt-get install curl
        curl -O <a href="$URL/$KEYRING_DEB">$URL/$KEYRING_DEB</a>
        dpkg -i ${KEYRING_DEB##*/}
    </code>

    <p>To install a package from this repository, for instance <u>$EXAMPLE</u>, run:</p>

    <code>
        apt-get update
        apt-get -t $DIST install $EXAMPLE
    </code>

    <p>Have fun!</p>

    <p class='navigation'>
      <a href="packages.html">Available packages</a>
      &nbsp; | &nbsp; <a href=".">Browse release</a>
      &nbsp; | &nbsp; <a href="../../readme.html">Other releases</a>
      ${IMPRESSUM_URL:+&nbsp; | &nbsp; <a href="$IMPRESSUM_URL">Impressum</a>}
      ${EMAIL_URL:+&nbsp; | &nbsp; <a href="$EMAIL_URL">E-mail</a>}
    </p>
  </body>
</html>
EOF
