#!/usr/bin/env bash

set -e

# Grabs relevant man pages from htmltools and strips roxygen signature

HTMLTOOLS_PATH="$HOME/Development/htmltools"

sed '/% Generated by roxygen2 /d' "$HTMLTOOLS_PATH/man/HTML.Rd" > ../man/HTML.Rd
sed '/% Generated by roxygen2 /d' "$HTMLTOOLS_PATH/man/builder.Rd" > ../man/builder.Rd
sed '/% Generated by roxygen2 /d' "$HTMLTOOLS_PATH/man/include.Rd" > ../man/include.Rd
sed '/% Generated by roxygen2 /d' "$HTMLTOOLS_PATH/man/singleton.Rd" > ../man/singleton.Rd
sed '/% Generated by roxygen2 /d' "$HTMLTOOLS_PATH/man/tag.Rd" > ../man/tag.Rd
sed '/% Generated by roxygen2 /d' "$HTMLTOOLS_PATH/man/validateCssUnit.Rd" > ../man/validateCssUnit.Rd
sed '/% Generated by roxygen2 /d' "$HTMLTOOLS_PATH/man/withTags.Rd" > ../man/withTags.Rd
