All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Rokos <michal.rokos@nextsoft.cz>
To: git@vger.kernel.org
Subject: [Patch] Using 'perl' in *.sh
Date: Sat, 8 Jul 2006 17:32:04 +0200	[thread overview]
Message-ID: <200607081732.04273.michal.rokos@nextsoft.cz> (raw)

Hi,

some GIT's shell script are using bare 'perl' for perl invocation. It's 
causing me problems... I compile git with PERL_PATH set and I'd suggest to 
use it everywhere.

So @@PERL@@ would be replaced with PERL_PATH_SQ instead.

What do you think?

Michal

Signed-off-by: Michal Rokos <michal.rokos@nextsoft.cz>

diff --git a/Makefile b/Makefile
index 202f261..8f9881f 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 03df143..06a8d26 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 6a14b25..0368803 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -324,7 +324,7 @@ test -d "$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 22c4ce8..08d786d 100755
--- a/git-commit.sh
+++ b/git-commit.sh
@@ -147,7 +147,7 @@ #'
 	    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 48818f8..f80299d 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 3945e06..1b9e986 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"

-- 
Michal Rokos

NextSoft s.r.o.
Vyskočilova 1/1410
140 21 Praha 4
phone:  +420 267 224 311
fax:    +420 267 224 307
mobile: +420 736 646 591
e-mail: michal.rokos@nextsoft.cz

             reply	other threads:[~2006-07-08 15:32 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-08 15:32 Michal Rokos [this message]
2006-07-08 18:27 ` [Patch] Using 'perl' in *.sh Junio C Hamano
2006-07-09  9:46   ` Alex Riesen
2006-07-09  9:51     ` Jan-Benedict Glaw
2006-07-09 10:14       ` Junio C Hamano
2006-07-09 12:41         ` Michal Rokos
2006-07-09 14:02           ` Randal L. Schwartz
2006-07-09 16:24             ` Jan-Benedict Glaw
2006-07-09 20:33           ` Junio C Hamano
2006-07-09 21:20             ` Jan-Benedict Glaw
2006-07-10  5:41             ` Michal Rokos
2006-07-10 13:09               ` Randal L. Schwartz
2006-07-10 13:16                 ` Johannes Schindelin
2006-07-10 13:29                   ` Randal L. Schwartz
2006-07-09 10:09     ` Yakov Lerner
2006-07-09 12:17       ` Alex Riesen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200607081732.04273.michal.rokos@nextsoft.cz \
    --to=michal.rokos@nextsoft.cz \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.