-
Notifications
You must be signed in to change notification settings - Fork 14
/
.mrp-install
37 lines (30 loc) · 1.04 KB
/
.mrp-install
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
#!/bin/bash
#This is a config file, sourced by mrp-install.sh script
#Returns current branch of git repo. Works only when PWD inside a repository
function git.branch() {
br=$(git branch | grep "*")
echo ${br/* /}
}
GIT_BRANCH=$(git.branch)
if [ -z $GIT_BRANCH ]; then
echo "ERROR: No current branch found. Exitting."
popd >/dev/null
exit 1
fi
MRP_REMOTE_BRANCH=$GIT_BRANCH
MRP_INSTALL_PATH=$CG_TOOLS/houdini/public_configs/$GIT_BRANCH
mkdir -p $MRP_INSTALL_PATH
MRP_SOURCE_PATH=$(pwd)/_build
MRP_EXCLUDE_MASKS=".git* .mrp-install *.pyc backup *.ipr *.iws *.iml README.md examples _build"
# Pre-installation build
EXCLUDE_ARGS=""
for i in $MRP_EXCLUDE_MASKS; do
EXCLUDE_ARGS="$EXCLUDE_ARGS --exclude=$i"
done
echo "Copying everything except asset libraries to _build directory"
/usr/bin/rsync -rclp --chmod=Dugo=rwx,Fugo=rX --del --delete-excluded --exclude=_build --exclude=otls $EXCLUDE_ARGS $(pwd)/ $(pwd)/_build
echo "Collapsing asset libraries..."
mkdir -p _build/otls
for hda in otls/*.hda; do
hotl -l $hda _build/$hda || exit 1
done