+++ /dev/null
-#!/bin/bash
-
-set -e
-
-modify="no"
-for i in $@;do
- case "$i" in
- --modify|-m) modify="yes"
- esac
-done
-
-builddir="$(dirname "$0")/../build"
-autoinc="-I$(pwd)"
-for d in $(find $(pwd) $builddir/include $builddir/privateinclude -type d);do
- autoinc+=" -I$d"
-done
-
-allfiles="$(find -iname '*.cpp' -printf '%P\n')"
-allfiles+=" $(find -iname '*.h' -printf '%P\n')"
-for i in $allfiles;do
- if [ -n "$(moc -nw $i $autoinc)" ];then
- found="no"
- for f in $i ${i//_p_p.h/.cpp} ${i//_p.h/.cpp} ${i/.h/.cpp} ${i//.cpp/.h};do
- # echo " >> Checking: $f"
- if [ -e "$f" ];then
- if grep -q "moc_$(basename $i)" $f ;then
- found="yes"
- break
- fi
- fi
- done
- norm="${i//_p_p.h/.cpp}"
- norm="${norm//_p.h/.cpp}"
- norm="${norm//.h/.cpp}"
- if [ "$found" = "no" ] && [ "$modify" = "no" ];then
- echo "moc_$(basename $i) in $norm"
- elif [ "$found" = "no" ] && [ "$modify" = "yes" ];then
- echo "#include \"moc_$(basename $i)\"" >> "$norm"
- fi
- fi
-done
--- /dev/null
+#!/usr/bin/python
+
+import sys, os, shutil, subprocess
+
+cwd = os.path.dirname(__file__)
+
+doxygen = None
+for path in os.environ.get('PATH', '/bin:/usr/bin').split(':'):
+ sfile = '%s/doxygen' % path
+ if os.access(sfile, os.X_OK):
+ doxygen = sfile
+ break
+
+if not doxygen:
+ sys.stderr.write('Doxygen is not installed\n')
+ sys.exit(1)
+
+sys.stdout.write('Generating API docs for Katie...\n')
+apidir = '%s/apidocs' % cwd
+if os.path.isdir(apidir):
+ shutil.rmtree(apidir)
+subprocess.check_call((doxygen, '%s/../doxygen.conf' % cwd))
+
+++ /dev/null
-#!/bin/bash
-
-set -e
-
-cwd="$(dirname $0)"
-
-if ! type -p doxygen;then
- echo "Doxygen is not installed"
- exit 1
-fi
-
-rm -rf apidocs/*
-echo "Generating API docs for Katie..."
-doxygen ${cwd}/../doxygen.conf
\ No newline at end of file
--- /dev/null
+#!/usr/bin/python
+
+import sys, os, subprocess
+
+cwd = os.path.dirname(__file__)
+
+pod2man = None
+for path in os.environ.get('PATH', '/bin:/usr/bin').split(':'):
+ sfile = '%s/pod2man' % path
+ if os.access(sfile, os.X_OK):
+ pod2man = sfile
+ break
+
+if not pod2man:
+ sys.stderr.write('Perl is not installed\n')
+ sys.exit(1)
+
+sys.stdout.write('Generating man pages for Katie...\n')
+for root, sdir, lfiles in os.walk('%s/../src/tools' % cwd):
+ for sfile in lfiles:
+ if sfile.endswith('.pod'):
+ ffile = '%s/%s' % (root, sfile)
+ ofile = ffile.replace('.pod', '.1')
+ subprocess.check_call(
+ (pod2man,
+ '--release=Katie 4.9.0',
+ '--center=Katie Manual',
+ '--section=1',
+ '--utf8',
+ ffile,
+ ofile)
+ )
+++ /dev/null
-#!/bin/bash
-
-set -e
-
-cwd="$(dirname $0)"
-
-if ! type -p pod2man;then
- echo "Perl is not installed"
- exit 1
-fi
-
-echo "Generating man pages for Katie..."
-for pfile in $(find $cwd/../src/tools -name '*.pod');do
- ofile="${pfile//.pod/.1}"
- pod2man --release="Katie 4.9.0" \
- --center="Katie Manual" \
- --section='1' --utf8 $pfile > $ofile
-done
\ No newline at end of file
+++ /dev/null
-#!/bin/bash
-
-set -e
-
-builddir="$(dirname "$0")/../build"
-autoinc="-I$(pwd)"
-for d in $(find $(pwd) $builddir/include $builddir/privateinclude -type d);do
- autoinc+=" -I$d"
-done
-
-allfiles="$(find -iname '*.cpp' -printf '%P\n')"
-allfiles+=" $(find -iname '*.h' -printf '%P\n')"
-for i in $allfiles;do
- if [ -n "$(moc -nw $i $autoinc)" ];then
- echo ' ${CMAKE_CURRENT_SOURCE_DIR}/'$i
- fi
-done