Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/perl/header_templates/runtime_prefix.template.pl # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / perl / header_templates / runtime_prefix.template.pl` 42 lines ยท 1152 bytes Raw Blame History 1 # BEGIN RUNTIME_PREFIX generated code. 2 # 3 # This finds our Git::* libraries relative to the script's runtime path. 4 sub __git_system_path { 5 my ($relpath) = @_; 6 my $gitexecdir_relative = '@GITEXECDIR_REL@'; 7 8 # GIT_EXEC_PATH is supplied by `git` or the test suite. 9 my $exec_path; 10 if (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". 15 require 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 22 require File::Spec; 23 return File::Spec->catdir($prefix, $relpath); 24 } 25 26 BEGIN { 27 use lib split /@PATHSEP@/, 28 ( 29 $ENV{GITPERLLIB} || 30 do { 31 my $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.