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 ================================================================
_______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
