2 # Package: RN Makefile System Utility
3 # File: tarball-src-filter.sh
4 # Desc: Filters package, excluding all non-source files
5 # Usage: tarball-src-filter.sh <pkgroot>
8 # /*! \cond RNMAKE_DOXY*/
13 # Recurse through directories and filter out "non-source" files and directories.
14 # In awk, regular expression rules are compared against the input records until
15 # one fires which will execute the associated action. Actions are:
16 # 'next' skips current record (i.e. filter out from stream)
17 # 'print $0' prints the line line (i.e. allow).
18 # Note: Order is important. The last record allows all unfiltered lines to be
19 # included. Keep last.
21 find ${pkgroot} -print | \
33 /docs\/doxy/ { print $0 }
34 /docs\/images/ { next }
35 /docs\/.*\.doxy/ { print $0 }
50 # The old way - too limited
52 # -regex "${pkgroot}/docs/[^di].*" -or \
53 # -wholename "${pkgroot}/hw" -or -name hw -or \
54 # -wholename "${pkgroot}/fw" -or -name fw -or \
55 # -wholename "${pkgroot}/os" -or -name os -or \
56 # -wholename "${pkgroot}/dist" -or -name dist -or \
57 # -wholename "${pkgroot}/loc" -or -name loc -or \
58 # -name '*.svn*' -or -wholename '.svn' -or \
59 # -wholename '*.deps*' -or -name '.deps' -or \
60 # -wholename '*obj*' -or -wholename 'obj' -or -wholename '*.o' -or \
61 # -wholename '*.out' -or -wholename '*.log' -or \
62 # -wholename '*.pyc' -or -wholename '*.pyo' \
63 # \) -prune -or -print | \