summaryrefslogtreecommitdiffstats
path: root/polly/utils/update_format.sh
blob: 9226fc6af5268da1e0e2a1daf0b8ee7613ef76e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

CLANG_FORMAT=${CLANG_FORMAT}

if [ "${CLANG_FORMAT}x" = "x" ]; then
  CLANG_FORMAT=`which clang-format`
  if [ "${CLANG_FORMAT}x" = "x" ]; then
     echo "Error: cannot find clang-format in your path"
     exit 1
  fi
fi

for ARG in "$@"
  do
    ${CLANG_FORMAT} -i $ARG
  done
OpenPOWER on IntegriCloud