Menu

[r1475]: / trunk / tools / userSetup.pm  Maximize  Restore  History

Download this file

58 lines (48 with data), 1.3 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
# !!! These are all the user specific URL/path that might need to be changed for
# !!! your setup.
package userSetup;
use strict;
use base 'Exporter';
use Cwd;
our @EXPORT = qw(getUserdir getSVNRoot);
my $userdir = "";
# User directory. All generated and temporary files will be in this folder.
sub getUserdir
{
if( $userdir ne "" )
{
return $userdir;
}
if( $^O ne "MSWin32" )
{
# On my setup, both my unix and win32 machines share the
# same user directory intended for my projects.
# If that shared directory is found, use it instead.
# If not, use a local directory in the OS user account.
# \Mario
my $temp = "/mnt/hgfs/ta-lib-user/";
if( -e $temp && -d $temp )
{
$userdir = $temp;
}
else
{
$userdir = $ENV{'HOME'};
}
}
else
{
# Running on win32 machine.
$userdir = $ENV{'USERPROFILE'}."\\Temp\\";
#$userdir = "c:\\Users\\Mario\\ta-lib-user\\";
}
return $userdir;
}
# Return the SVN URL of TA-Lib
# In my case, I sometime change this to a local mirror repository.
# Most people won't need to change this.
sub getSVNRoot
{
return "http://ta-lib.svn.sourceforge.net/svnroot/ta-lib/trunk/ta-lib";
}
1;