Changeset 1181 in ProjectBuilder for devel/pb/lib
- Timestamp:
- Feb 12, 2011, 1:56:42 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/lib/ProjectBuilder/Env.pm
r1176 r1181 59 59 sub pb_env_init_pbrc { 60 60 61 $ENV{'PBETC'} = "$ENV{'HOME'}/.pbrc"; 61 # if sudo, then get the real id of the user laucnhing the context 62 # to point to the right conf file 63 # Mandatory for rpmbootstrap calls 64 my $dir; 65 66 if (defined $ENV{'SUDO_USER'}) { 67 # Home dir is the 8th field in list context 68 $dir = (getpwnam($ENV{'SUDO_USER'}))[7]; 69 } else { 70 $dir = $ENV{'HOME'}; 71 } 72 73 $ENV{'PBETC'} = "$dir/.pbrc"; 62 74 63 75 if (! -f $ENV{'PBETC'}) {
Note:
See TracChangeset
for help on using the changeset viewer.