#!/bin/bash #modified from dodoc by Tod Neidt for x in "$@" do if [ -e ${x} ] then cp ${x} ${x}.orig #Edit URI html links in Anchor tags to append .gz #then go back through and undo nonlocal links #How do you icorporate a negate in first substitute :( sed -e 's/\([(HREF|href)].*[(html|htm)]\)/\1.gz/g' \ -e 's/\([(HREF|href)].*http.*[(html|htm)]\)\.gz/\1/g' \ ${x}.orig > ${x} if [ ! -d ${D}usr/share/doc/${PF} ] then install -d ${D}usr/share/doc/${PF} fi if [ -z ${DOCDESTTREE} ] then install -m0644 ${x} ${D}usr/share/doc/${PF} gzip -f -9 ${D}usr/share/doc/${PF}/${x##*/} else install -m0644 ${x} ${D}usr/share/doc/${PF}/${DOCDESTTREE} gzip -f -9 ${D}usr/share/doc/${PF}/${DOCDESTTREE}/${x##*/} fi else echo "${0}: ${x} does not exist." fi done