summaryrefslogtreecommitdiff
path: root/package_physicsextensions.sh
blob: 5b4c23ecc9f338ad3778e6216b74c07e9177bc27 (plain)
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
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash

cd "$(dirname "$0")"

# turn on verbose debugging output for parabuild logs.
set -x
# make errors fatal
set -e

if [ -z "$AUTOBUILD" ] ; then
    fail
fi

if [ "$OSTYPE" = "cygwin" ] ; then
    export AUTOBUILD="$(cygpath -u $AUTOBUILD)"
fi

# load autbuild provided shell functions and variables
eval "$("$AUTOBUILD" source_environment)"

projectDir="$(pwd)"

#directories we need the headers from
projects="llcommon llimage llmath llrender"

source="$projectDir/indra"

stage="$projectDir/stage/include"
mkdir -p $stage

for project in $projects
do
	dstIncludeDir="$stage/$project"
	mkdir -p $dstIncludeDir
	headers="$source/$project/*.h"
	cp $headers "$dstIncludeDir"
	headers="$source/$project/*.inl"
	# not all projects have .inl files
	files=$(ls $headers 2> /dev/null | wc -l)
	if [ "$files" != "0" ] ; then
	    cp $headers "$dstIncludeDir"
	fi
done
	
# Copy the license files into place for packaging
srcLicenseDir="$projectDir/doc"
dstLicenseDir="$projectDir/stage/LICENSES"

mkdir -p "$dstLicenseDir"
cp "$srcLicenseDir/LGPL-licence.txt" "$dstLicenseDir/LGPL-licence.txt"

pass