From 610107cc3dced9fd39b24f9d6185e376b3375150 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 21 Jan 2016 14:26:31 -0800 Subject: [PATCH] nth attempt to make clang-format work --- tools/codegen/core/gen_load_balancing_proto.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tools/codegen/core/gen_load_balancing_proto.sh b/tools/codegen/core/gen_load_balancing_proto.sh index 4505eec502c..45c3282b3cb 100755 --- a/tools/codegen/core/gen_load_balancing_proto.sh +++ b/tools/codegen/core/gen_load_balancing_proto.sh @@ -120,11 +120,18 @@ sed -i "s:$PROTO_BASENAME.pb.h:src/core/proto/grpc/lb/v0/$PROTO_BASENAME.pb.h:g" # prepend copyright TMPFILE=$(mktemp) cat $COPYRIGHT_FILE "$OUTPUT_DIR/$PROTO_BASENAME.pb.c" > $TMPFILE -mv $TMPFILE "$OUTPUT_DIR/$PROTO_BASENAME.pb.c" +mv -v $TMPFILE "$OUTPUT_DIR/$PROTO_BASENAME.pb.c" cat $COPYRIGHT_FILE "$OUTPUT_DIR/$PROTO_BASENAME.pb.h" > $TMPFILE -mv $TMPFILE "$OUTPUT_DIR/$PROTO_BASENAME.pb.h" +mv -v $TMPFILE "$OUTPUT_DIR/$PROTO_BASENAME.pb.h" -docker run --rm=true -v $OUTPUT_DIR:/local -t grpc_clang_format \ - bash -c 'clang-format-3.6 -style="{BasedOnStyle: Google, Language: Cpp}" -i /local/load_balancer.pb.*' +ls -l $OUTPUT_DIR + +docker run --rm=false -v $OUTPUT_DIR:/lol -t grpc_clang_format \ + ls -l / +docker run --rm=true -v $OUTPUT_DIR:/lol -t grpc_clang_format \ + ls -l /lol + +# clang-format-3.6 -style="{BasedOnStyle: Google, Language: Cpp}" \ +# -i /local/load_balancer.pb.c /local/load_balancer.pb.h popd > /dev/null