1# BEGIN RUNTIME_PREFIX generated code. 2# 3# This finds our Git::* libraries relative to the script's runtime path. 4sub __git_system_path { 5my($relpath) =@_; 6my$gitexecdir_relative='@@GITEXECDIR_REL@@'; 7 8# GIT_EXEC_PATH is supplied by `git` or the test suite. 9my$exec_path; 10if(exists$ENV{GIT_EXEC_PATH}) { 11$exec_path=$ENV{GIT_EXEC_PATH}; 12}else{ 13# This can happen if this script is being directly invoked instead of run 14# by "git". 15require FindBin; 16$exec_path=$FindBin::Bin; 17} 18 19# Trim off the relative gitexecdir path to get the system path. 20(my$prefix=$exec_path) =~s/\Q$gitexecdir_relative\E$//; 21 22require File::Spec; 23return File::Spec->catdir($prefix,$relpath); 24} 25 26BEGIN{ 27use lib split/@@PATHSEP@@/, 28( 29$ENV{GITPERLLIB} || 30do{ 31my$perllibdir= __git_system_path('@@PERLLIBDIR_REL@@'); 32(-e $perllibdir) ||die("Invalid system path ($relpath):$path"); 33$perllibdir; 34} 35); 36 37# Export the system locale directory to the I18N module. The locale directory 38# is only installed if NO_GETTEXT is set. 39$Git::I18N::TEXTDOMAINDIR = __git_system_path('@@LOCALEDIR_REL@@'); 40} 41 42# END RUNTIME_PREFIX generated code.