#!/bin/sh # # "$Id$" # # Script to make Xcode documentation sets. # docversion="1.4.`svnversion . | sed -e '1,$s/[a-zA-Z]//g'`" docset="" sources="" header="" intro="" title="" while test $# -gt 0; do arg="$1" shift case "$arg" in --docset) docset="$1" shift ;; --header) header="$1" shift ;; --intro) intro="$1" shift ;; --title) title="$1" shift ;; *) sources="$sources $arg" ;; esac done echo "

$title

" >"$header.ds" sed -e '1,$s/>"$header.ds" sed -e '1,$s/\/images\///g' -e '1,$s/"$intro.tmp" sed -e '1,$s/http:\/\/www.cups.org\/documentation\.php\/#/#/g' <"$intro.tmp" >"$intro.ds" mxmldoc --docset "$docset" --docversion "$docversion" \ --feedname cups.org --feedurl http://www.cups.org/docsets.atom \ --title "$title" --css ../doc/cups-printable.css \ --header "$header.ds" --intro "$intro.ds" $sources || exit 1 rm -f "$header.ds" "$intro.ds" "$intro.tmp" if test ! -d ../docsets; then mkdir ../docsets fi for image in `grep /images "$intro" | sed -e '1,$s/^.*\/images\///' -e '1,$s/\.png.*$/.png/'`; do cp ../doc/images/$image "$docset/Contents/Resources/Documentation" done xar="`basename \"$docset\" .docset`.xar" /Developer/usr/bin/docsetutil package --output "../docsets/$xar" \ --atom ../docsets/docsets.atom \ --download-url "http://www.cups.org/docsets/$xar" "$docset" || exit 1 rm -rf "$docset" # # End of "$Id$". #