aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-04-07 13:49:51 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-04-07 13:49:51 (GMT)
commitb81e594128c47642a0759d5a4187680c5761ad9c (patch)
tree03ed223c7b8261c74f72a481369870fa6672e24b
parent000439933f6f642ccf12f80b9407fa55398a9633 (diff)
Properly escape characters '%' '"' and '\' at git_log
Instead of replacing all special characters at git_log, just replace the ones that would cause a trouble for printk. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--linux/Makefile4
-rwxr-xr-xlinux/use_dir.pl2
2 files changed, 3 insertions, 3 deletions
diff --git a/linux/Makefile b/linux/Makefile
index 8c0d96e..a58246e 100644
--- a/linux/Makefile
+++ b/linux/Makefile
@@ -61,7 +61,7 @@ todaytar:
@if [ "$(DIR)" = "" ]; then echo "make $@ DIR=<version>"; exit -1; fi
-rm -f $(PWD)/$(TODAY_TAR).bz2
tar cf $(PWD)/$(TODAY_TAR) -C $(DIR) $(TARFILES)
- git --git-dir $(DIR)/.git log --pretty=oneline HEAD^1^1^1..HEAD | head -3 |sed -r s,"[\x01-\x1f\x21-\x2f\x3a-\x40]"," ",g >git_log
+ git --git-dir $(DIR)/.git log --pretty=oneline HEAD^1^1^1..HEAD | head -3 |sed -r s,'([\x22\x25\x5c])','\x5c\\1',g >git_log
tar rvf $(PWD)/$(TODAY_TAR) git_log
for i in $(TARDIR); do \
if [ "`echo $$i|grep Documentation`" = "" ]; then \
@@ -78,7 +78,7 @@ tar:
@if [ "$(DIR)" = "" ]; then echo "make $@ DIR=<version>"; exit -1; fi
-rm -f $(PWD)/linux-media.tar.bz2
tar cf $(PWD)/linux-media.tar -C $(DIR) $(TARFILES)
- git --git-dir $(DIR)/.git log --pretty=oneline HEAD^1^1^1..HEAD | head -3 | sed -r s,"[\x01-\x1f\x21-\x2f\x3a-\x40]"," ",g >git_log
+ git --git-dir $(DIR)/.git log --pretty=oneline HEAD^1^1^1..HEAD |sed -r s,'([\x22\x25\x5c])','\x5c\\1',g >git_log
tar rvf $(PWD)/linux-media.tar git_log
for i in $(TARDIR); do \
if [ "`echo $$i|grep Documentation`" = "" ]; then \
diff --git a/linux/use_dir.pl b/linux/use_dir.pl
index 5da3acf..95df457 100755
--- a/linux/use_dir.pl
+++ b/linux/use_dir.pl
@@ -312,4 +312,4 @@ if ($get_patched && $patches_applied) {
}
write_ctlfile();
-system "git --git-dir $dir/.git log --pretty=oneline HEAD^1^1^1^1^1..HEAD | head -5 | sed -r s,"[\x01-\x1f\x21-\x2f\x3a-\x40]"," ",g >git_log"
+system "git --git-dir $dir/.git log --pretty=oneline HEAD^1^1^1^1^1..HEAD | head -5 | |sed -r s,'([\x22\x25\x5c])','\x5c\\1',g >git_log"

Privacy Policy