forked from AcademySoftwareFoundation/rez
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.sh
More file actions
80 lines (56 loc) · 2.29 KB
/
init.sh
File metadata and controls
80 lines (56 loc) · 2.29 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#
# System initialization script for rez. Source this file in order to use rez. You probably
# want to do that in ~/.bashrc or equivalent startup script.
#
# rez version
export REZ_VERSION=!REZ_VERSION!
# rez OS
export REZ_PLATFORM=!REZ_PLATFORM!
# where rez is installed
export REZ_PATH=!REZ_BASE_PATH!/!REZ_VERSION!
if [ ! -d $REZ_PATH ]; then
echo "ERROR! Rez could not be found at $REZ_PATH" 1>&2
else
# where rez searches for packages
if [ "$REZ_PACKAGES_PATH" == "" ]; then
export REZ_PACKAGES_PATH=!REZ_LOCAL_PKGS_PATH!:!REZ_PACKAGES_PATH!
fi
# where rez will publish packages to (ie those released with rez-release)
if [ "$REZ_RELEASE_PACKAGES_PATH" == "" ]; then
export REZ_RELEASE_PACKAGES_PATH=!REZ_PACKAGES_PATH!
fi
# where rez will publish local packages to (ie those installed with rez-build -- -- install)
if [ "$REZ_LOCAL_PACKAGES_PATH" == "" ]; then
export REZ_LOCAL_PACKAGES_PATH=!REZ_LOCAL_PKGS_PATH!
fi
# where rez-egg-install will install python egg packages to
if [ "$REZ_EGG_PACKAGES_PATH" == "" ]; then
export REZ_EGG_PACKAGES_PATH=!REZ_PACKAGES_PATH!
fi
# expose rez binaries, replacing existing rez paths if they have been set already
PATH=`echo $PATH | /usr/bin/tr ':' '\n' | grep -v '^$' | grep -v '!REZ_BASE_PATH!' | /usr/bin/tr '\n' ':'`
export PATH=$PATH:$REZ_PATH/bin
if [ "$REZ_RELEASE_EDITOR" == "" ]; then
export REZ_RELEASE_EDITOR=!REZ_RELEASE_EDITOR!
fi
if [ "$REZ_DOT_IMAGE_VIEWER" == "" ]; then
export REZ_DOT_IMAGE_VIEWER=!REZ_DOT_IMAGE_VIEWER!
fi
source $REZ_PATH/bin/_complete
fi
# Copyright 2008-2012 Dr D Studios Pty Limited (ACN 127 184 954) (Dr. D Studios)
#
# This file is part of Rez.
#
# Rez is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Rez is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Rez. If not, see <http://www.gnu.org/licenses/>.