Changeset 15018 for gsdl/trunk/perllib/util.pm
- Timestamp:
- 2008-02-27T17:07:17+13:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/util.pm
r15003 r15018 797 797 798 798 799 sub locate_config_file 800 { 801 my ($file) = @_; 802 803 my $locations = locate_config_files($file); 804 805 return shift @$locations; # returns undef if 'locations' is empty 806 } 807 808 809 sub locate_config_files 810 { 811 my ($file) = @_; 812 813 my @locations = (); 814 815 if (-e $file) { 816 # Clearly specified (most likely full filename) 817 # No need to hunt in 'etc' directories, return value unchanged 818 push(@locations,$file); 819 } 820 else { 821 # Check for collection specific one before looking in global GSDL 'etc' 822 823 my $test_collect_etc_filename 824 = &util::filename_cat($ENV{'GSDLCOLLECTDIR'},"etc", $file); 825 826 if (-e $test_collect_etc_filename) { 827 push(@locations,$test_collect_etc_filename); 828 } 829 830 my $test_main_etc_filename 831 = &util::filename_cat($ENV{'GSDLHOME'},"etc", $file); 832 if (-e $test_main_etc_filename) { 833 push(@locations,$test_main_etc_filename); 834 } 835 } 836 837 return \@locations; 838 } 839 840 799 841 sub hyperlink_text 800 842 {
Note:
See TracChangeset
for help on using the changeset viewer.