git-migration: msgconv.sh (NEW) - script to be used for git-filter-branch -...
glen
glen at pld-linux.org
Sat Feb 5 14:35:56 CET 2011
Author: glen Date: Sat Feb 5 13:35:56 2011 GMT
Module: git-migration Tag: HEAD
---- Log message:
- script to be used for git-filter-branch --msg-filter
---- Files affected:
git-migration:
msgconv.sh (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: git-migration/msgconv.sh
diff -u /dev/null git-migration/msgconv.sh:1.1
--- /dev/null Sat Feb 5 14:35:56 2011
+++ git-migration/msgconv.sh Sat Feb 5 14:35:51 2011
@@ -0,0 +1,12 @@
+#!/bin/sh
+# if any of the chars matched, iconv latin2->utf8, otherwise just print it
+# IMPORTANT: this file needs to be latin2 encoded
+# this script should be used as filter to "git-filter-branch":
+# $ git-filter-branch --msg-filter msgconv.sh
+
+s=$(cat)
+if echo "$s" | grep --color '[±æê³ñ󶼿¡ÆÊ£ÑÓ¦¬¯]'; then
+ echo "$s" | iconv -flatin2 -tutf8
+else
+ echo "$s"
+fi
================================================================
More information about the pld-cvs-commit
mailing list