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/tools/generate-perl.sh # 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 / tools / generate-perl.sh` 37 lines ยท 696 bytes Raw Blame History 1 #!/bin/sh 2 3 set -e 4 5 if test $# -ne 5 6 then 7 echo >&2 "USAGE: $0 " 8 exit 1 9 fi 10 11 GIT_BUILD_OPTIONS="$1" 12 GIT_VERSION_FILE="$2" 13 PERL_HEADER="$3" 14 INPUT="$4" 15 OUTPUT="$5" 16 17 . "$GIT_BUILD_OPTIONS" 18 . "$GIT_VERSION_FILE" 19 20 sed -e '1{' \ 21 -e " /^#!.*perl/!b" \ 22 -e " s|#!.*perl|#!$PERL_PATH|" \ 23 -e " r $PERL_HEADER" \ 24 -e ' G' \ 25 -e '}' \ 26 -e "s|@GIT_VERSION@|$GIT_VERSION|g" \ 27 -e "s|@LOCALEDIR@|$PERL_LOCALEDIR|g" \ 28 -e "s|@NO_GETTEXT@|$NO_GETTEXT|g" \ 29 -e "s|@NO_PERL_CPAN_FALLBACKS@|$NO_PERL_CPAN_FALLBACKS|g" \ 30 "$INPUT" >"$OUTPUT" 31 32 case "$INPUT" in 33 *.perl|*git-contacts) 34 chmod a+x "$OUTPUT";; 35 *) 36 ;; 37 esac