File: make-included-headers-hierarchy.sh

package info (click to toggle)
openms 2.4.0-real-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 646,136 kB
  • sloc: cpp: 392,260; xml: 215,373; python: 10,976; ansic: 3,325; php: 2,482; sh: 901; ruby: 399; makefile: 141; perl: 85
file content (35 lines) | stat: -rwxr-xr-x 774 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh

WORK_DIR=$PWD

DEBIAN_DIR=${WORK_DIR}/debian

INCLUDES_DIR=${DEBIAN_DIR}/includes/OpenMS

rm -rf ${INCLUDES_DIR}

srcDirs="openms  openms_gui  openswathalgo superhirn"

for dir in ${srcDirs}
do
    cd src/${dir}/include/OpenMS
    
    for file in $(find . -type f | grep ".*\.h[p]\{0,2\}$" | sed 's|^./||')
    do 
        # except files in debian/ !!!
        echo ${file} | grep debian 
        if [ "$?" != "0" ]
        then
            baseName=$(basename ${file})
            # echo "baseName: ${baseName}"
            
            dirName=$(dirname ${file})
            # echo "dirName: ${dirName}"
            
            mkdir -p ${INCLUDES_DIR}/${dirName}
            cp ${file} ${INCLUDES_DIR}/${dirName}
        fi
    done

    cd ${WORK_DIR}
done