File: create-files.sh

package info (click to toggle)
devhelp-books 0.5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,168 kB
  • ctags: 24
  • sloc: sh: 66; python: 64; makefile: 42
file content (20 lines) | stat: -rwxr-xr-x 647 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash -e

NOBOOK=""

test -d debian && cd debian

rm devhelp-book-*doc-base* > /dev/null 2>&1 || /bin/true
for i in *.files.in; do
    test -f ${i/.in/} && rm ${i/.in/} || /bin/true
    test -f ${i/files.in/links} && rm ${i/files.in/links} || /bin/true
    echo "Processing $i..."
    for a in $(cat $i); do
	if ! echo "$NOBOOK" | grep -q "$a"; then
	    echo "usr/share/devhelp/books/${a}" >> ${i/.in/}
	    echo -n "usr/share/devhelp/books/${a} " >> ${i/files.in/links}
	    echo "usr/share/doc/${i/.files.in/}/html/${a}" >> ${i/files.in/links}
	    ./grab-book-info.py ${i/.files.in/} ${a} > ${i/files.in/doc-base.${a}}
	fi
    done
done