File: make-included-headers-hierarchy.sh

package info (click to toggle)
libpwiz 3.0.18342-4.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,072 kB
  • sloc: cpp: 157,547; sh: 4,185; makefile: 314
file content (40 lines) | stat: -rwxr-xr-x 872 bytes parent folder | download | duplicates (2)
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
36
37
38
39
40
#!/bin/sh

WORK_DIR=$PWD

DEBIAN_DIR=${WORK_DIR}/debian

INCLUDES_DIR=${DEBIAN_DIR}/includes/proteowizard

rm -rf ${INCLUDES_DIR}

for file in $(find . -type f | grep ".*\.h[p]\{0,2\}$" | sed 's|^./||')
do 
	# except files in debian/, .pc/ and doc/ !!!
	echo ${file} | grep ^debian
	debianDir=$?

	echo ${file} | grep ^doc
	docDir=$?

	echo ${file} | grep ^\.pc
	dotPcDir=$?

	if [ "${debianDir}" != 0 ] && [ "${docDir}" != 0 ] && [ "${dotPcDir}" != 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

# Note that there are also *.inl files.

mkdir -p ${DEBIAN_DIR}/includes/proteowizard/pwiz/data/common && \
cp pwiz/data/common/cv.inl \
${DEBIAN_DIR}/includes/proteowizard/pwiz/data/common/cv.inl