-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenv.sh
executable file
·39 lines (30 loc) · 1002 Bytes
/
env.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
#### Set things per OS
os="$(uname)"
echo $os
# Get the directory of the script directory
DB2TOOLDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "db2tools repo path : |$DB2TOOLDIR|"
if [[ $os = "Linux" ]];
then
platform="$(uname -i)"
echo "This is $platform"
if [[ $platform = "x86_64" ]];
then
#### External perl lib.
## External perl library that I migrated from other linux platform.
export PERL5LIB=$DB2TOOLDIR/PERLLNXLIB/lib/perl5:$PERL5LIB
#echo "setting dependent perl libraries : |$PERL5LIB|"
elif [[ $platform = "ppc64le" ]];
then
echo "$platform"
fi
elif [[ $os = "AIX" ]]; ## somehow 'uname -i' does not work on AIX.
then
echo "This is $os"
else
print "Not Linux/AIX. Where am I then ???"
fi
export PATH=$DB2TOOLDIR:$PATH
export PERL5LIB=$DB2TOOLDIR/lib:$PERL5LIB
echo "PATH : |$PATH|"
echo "PERL5LIB : |$PERL5LIB|"