aboutsummaryrefslogtreecommitdiff
path: root/tools/cpm/format.sh
blob: 8d99b4796b4ffdd0ba12e76b63768b24466c64af (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh -e

# SPDX-FileCopyrightText: 2025 crueter
# SPDX-License-Identifier: GPL-3.0-or-later

# shellcheck disable=SC1091
. tools/cpm/common.sh

# shellcheck disable=SC2086
FILES=$(find $DIRS -maxdepth "$MAXDEPTH" -name cpmfile.json)

for file in $FILES; do
    jq --indent 4 < "$file" > "$file".new
    mv "$file".new "$file"
done