Fix youtube.lua: Check for nil t.host
[libquvi-scripts.git] / autogen.sh
blob49c7608a7d59e73abd9c4dacd8d8f4a809b32cc3
1 #!/bin/sh
2 # autogen.sh for libquvi-scripts.
4 source=.gitignore
5 cachedir=autom4te.cache
7 gen_manual()
9 echo "Generate manual..."
10 MAN=doc/man7/libquvi-scripts.7 ; POD=$MAN.pod ; VN=`./gen-ver.sh`
11 pod2man -c "libquvi-scripts manual" -n libquvi-scripts \
12 -s 7 -r "$VN" "$POD" "$MAN"
13 return $?
16 cleanup()
18 echo "WARNING!
19 Removes _files_ listed in $source and $cachedir directory.
20 Last chance to bail out (^C) before we continue."
21 read n1
22 [ -f Makefile ] && make distclean
23 for file in `cat $source`; do # Remove files only.
24 [ -e "$file" ] && [ -f "$file" ] && rm -f "$file"
25 done
26 [ -e "$cachedir" ] && rm -rf "$cachedir"
27 rmdir -p config.aux 2>/dev/null
28 exit 0
31 help()
33 echo "Usage: $0 [-c|-h] [top_srcdir]
34 -c Make the source tree 'maintainer clean'
35 -h Show this help and exit
36 Run without options to (re)generate the configuration files."
37 exit 0
40 while [ $# -gt 0 ]
42 case "$1" in
43 -c) cleanup;;
44 -h) help;;
45 *) break;;
46 esac
47 shift
48 done
50 echo "Generate configuration files..."
51 autoreconf -if && gen_manual && echo "You can now run 'configure'"