From d9bffc08fd2cec626e3a390fa4cc47587a8c7f9e Mon Sep 17 00:00:00 2001 From: Michal Rokos Date: Sat, 8 Jul 2006 17:32:04 +0200 Subject: [PATCH] Using 'perl' in *.sh Some GIT's shell script are using bare 'perl' for perl invocation. Use @@PERL@@ symbol and replace it with PERL_PATH_SQ everywhere. Signed-off-by: Michal Rokos Signed-off-by: Junio C Hamano --- Makefile | 1 + git-bisect.sh | 2 +- git-clone.sh | 2 +- git-commit.sh | 2 +- git-fetch.sh | 2 +- git-rebase.sh | 2 +- 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 5a625b4ef..588d9255d 100644 --- a/Makefile +++ b/Makefile @@ -514,6 +514,7 @@ common-cmds.h: Documentation/git-*.txt $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh rm -f $@ $@+ sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ + -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \ -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ -e 's/@@NO_CURL@@/$(NO_CURL)/g' \ -e 's/@@NO_PYTHON@@/$(NO_PYTHON)/g' \ diff --git a/git-bisect.sh b/git-bisect.sh index 03df1433e..06a8d2694 100755 --- a/git-bisect.sh +++ b/git-bisect.sh @@ -13,7 +13,7 @@ git bisect log show bisect log.' . git-sh-setup sq() { - perl -e ' + @@PERL@@ -e ' for (@ARGV) { s/'\''/'\'\\\\\'\''/g; print " '\''$_'\''"; diff --git a/git-clone.sh b/git-clone.sh index 6a14b2591..036880388 100755 --- a/git-clone.sh +++ b/git-clone.sh @@ -324,7 +324,7 @@ test -d "$GIT_DIR/refs/reference-tmp" && rm -fr "$GIT_DIR/refs/reference-tmp" if test -f "$GIT_DIR/CLONE_HEAD" then # Read git-fetch-pack -k output and store the remote branches. - perl -e "$copy_refs" "$GIT_DIR" "$use_separate_remote" "$origin" + @@PERL@@ -e "$copy_refs" "$GIT_DIR" "$use_separate_remote" "$origin" fi cd "$D" || exit diff --git a/git-commit.sh b/git-commit.sh index 22c4ce86c..08d786db2 100755 --- a/git-commit.sh +++ b/git-commit.sh @@ -147,7 +147,7 @@ run_status () { git-ls-files -z --others $option \ --exclude-per-directory=.gitignore fi | - perl -e '$/ = "\0"; + @@PERL@@ -e '$/ = "\0"; my $shown = 0; while (<>) { chomp; diff --git a/git-fetch.sh b/git-fetch.sh index 48818f822..f80299daa 100755 --- a/git-fetch.sh +++ b/git-fetch.sh @@ -278,7 +278,7 @@ fetch_main () { head="ref: $remote_name" while (expr "z$head" : "zref:" && expr $depth \< $max_depth) >/dev/null do - remote_name_quoted=$(perl -e ' + remote_name_quoted=$(@@PERL@@ -e ' my $u = $ARGV[0]; $u =~ s/^ref:\s*//; $u =~ s{([^-a-zA-Z0-9/.])}{sprintf"%%%02x",ord($1)}eg; diff --git a/git-rebase.sh b/git-rebase.sh index 3945e0671..1b9e98692 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -311,7 +311,7 @@ echo "$prev_head" > "$dotest/prev_head" msgnum=0 for cmt in `git-rev-list --no-merges "$upstream"..ORIG_HEAD \ - | perl -e 'print reverse <>'` + | @@PERL@@ -e 'print reverse <>'` do msgnum=$(($msgnum + 1)) echo "$cmt" > "$dotest/cmt.$msgnum" -- 2.26.2