db82b6fedb
This permits Magenta to build properly on systems where bash is not the default shell and/or is installed in locations other than /bin. Change-Id: Ic95e215c5d28b1a6e653bec53283540868c628f8
23 linhas
537 B
Bash
Arquivo Executável
23 linhas
537 B
Bash
Arquivo Executável
#!/usr/bin/env bash
|
|
|
|
# Copyright 2016 The Fuchsia Authors
|
|
#
|
|
# Use of this source code is governed by a MIT-style
|
|
# license that can be found in the LICENSE file or at
|
|
# https://opensource.org/licenses/MIT
|
|
|
|
SCRIPTSDIR=`dirname $0`
|
|
CLANGFMT=$SCRIPTSDIR/clang-format
|
|
|
|
if [ ! -f "$CLANGFMT" ]; then
|
|
echo "local clang-format not found. Running scripts/fetch-clang-fmt to get it."
|
|
( cd $SCRIPTSDIR && ./fetch-clang-fmt )
|
|
fi
|
|
|
|
if [ ! -f $CLANGFMT ]; then
|
|
echo "$CLANGFMT still not found. Exiting."
|
|
exit 0
|
|
fi
|
|
|
|
$CLANGFMT -i -style=file $@
|