Welcome to mirror list, hosted at ThFree Co, Russian Federation.

fetch-clang-format.sh « scripts - github.com/checkpoint-restore/criu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c9006c518b1fc8bbbdcbe481ba1b4451012a8442 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

# This script fetches .clang-format from the Linux kernel
# and slightly adapts it for CRIU.

URL="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/.clang-format?h=v5.13"

curl -s "${URL}" | sed -e "
	s,^\( *\)#\([A-Z]\),\1\2,g;
	s,ControlStatements,ControlStatementsExceptForEachMacros,g;
	s,ColumnLimit: 80,ColumnLimit: 120,g;
	s,Intended for clang-format >= 4,Intended for clang-format >= 11,g;
	s,ForEachMacros:,ForEachMacros:\n  - 'for_each_pstree_item',g;
	s,\(AlignTrailingComments:.*\)$,\1\nAlignConsecutiveMacros: true,g;
"  > .clang-format