diff options
Diffstat (limited to 'packaging/find-docs.sh')
-rw-r--r-- | packaging/find-docs.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/packaging/find-docs.sh b/packaging/find-docs.sh new file mode 100644 index 000000000..afe4e22b7 --- /dev/null +++ b/packaging/find-docs.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +usage () { +cat << EOF +Usage: $0 TOP_DIR + +EOF +exit 1 +} + +if [ -z "$1" ] ; then usage +elif [ $1 = / ] ; then echo $0: expects non-/ argument for '$1' 1>&2 +elif [ ! -d $1 ] ; then + echo $0: $1: no such directory + exit 1 +else TOP_DIR="`echo $1|sed -e 's:/$::'`" +fi +shift + +DOC_NAME=documentation.list +touch $DOC_NAME + +find $TOP_DIR -type f -o -type l | sed ' +s:'"$TOP_DIR"':: +s:\(.*/man/man./.*\.[0-9]\):%doc \1: +s:\(.*/man/*/man./.*\.[0-9]\):%doc \1: +s:\(.*/gtk-doc/html/.*\):%doc \1: +s:\(.*/info/.*\info.*\):%doc \1: +s:^\([^%].*\):: +/^$/d' >> $DOC_NAME + + +exit 0 |