Tweak acpclangformat

This commit is contained in:
Anthony Rose 2023-05-18 21:01:19 +01:00
parent 941fdb047e
commit 21bf7de5ba

View file

@ -421,9 +421,14 @@ tlscheck () {
} }
acpclangformat () { acpclangformat () {
cat << __EOF__ if [ -r .clang-format ]
then
echo "Error: .clang-format already exists" 1>&2
return 1
fi
echo "# Writing to .clang-format"
cat << __EOF__ | tee .clang-format
--- ---
# .clang-format
BasedOnStyle: WebKit BasedOnStyle: WebKit
BreakBeforeBraces: Stroustrup BreakBeforeBraces: Stroustrup
@ -433,6 +438,7 @@ Cpp11BracedListStyle: true
FixNamespaceComments: true FixNamespaceComments: true
... ...
__EOF__ __EOF__
command ls -l .clang-format
} }
if [ -r "$XDG_CONFIG_HOME/profile.local" ] if [ -r "$XDG_CONFIG_HOME/profile.local" ]