-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbind.sh
executable file
·54 lines (43 loc) · 1.33 KB
/
bind.sh
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
#! /usr/bin/env bash
# exit when any command fails
set -e
# keep track of the last executed command
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
# echo an error message before exiting
trap 'echo "\"${last_command}\" exited with code $?."' ERR
project_name="usd"
major_version=0
minor_version=1
patch_version=0
rm -rf build
astgen bind -u -v 0 \
-o build/ast \
-- \
-Wno-deprecated-register \
-Wno-deprecated-declarations \
-I${USD_ROOT}/include \
-I/usr/include/python2.7 \
-I${OPENEXR_ROOT}/include \
-I${IMATH_ROOT}/include \
-I${BOOST_ROOT}/include
asttoc build/ast -v 0 -o build -p ${project_name} \
-fp pxr \
-tll usd \
-tll tf \
-tll gf \
-tll vt \
-tll sdf \
-tll usdGeom \
-major ${major_version} -minor ${minor_version} -patch ${patch_version}
sed \
-e "s/PROJECT_NAME/${project_name}/g" \
-e "s/MAJOR_VERSION/${major_version}/g" \
-e "s/MINOR_VERSION/${minor_version}/g" \
-e "s/PATCH_VERSION/${patch_version}/g" \
scripts/build.rs > build/${project_name}-sys/build.rs
sed \
-e "s/PROJECT_NAME/${project_name}/g" \
-e "s/MAJOR_VERSION/${major_version}/g" \
-e "s/MINOR_VERSION/${minor_version}/g" \
-e "s/PATCH_VERSION/${patch_version}/g" \
scripts/Cargo.toml > build/${project_name}-sys/Cargo.toml