#!/bin/bash

file=$1

rootpath=/server/samba
genpath=${rootpath}/gen

protoc --plugin=protoc-gen-tars-java=${rootpath}/protoc-gen-tars-java --tars-java_out=${genpath} --java_out=${genpath} ${file}

for i in `ls ${genpath}` 
do
	sed -i 's/com.qq.tars.rpc.protocol.proto.ProtoCodec/com.bm.common.servant.codec.ProtoCodec/' ${genpath}/${i}
done
