diff options
Diffstat (limited to 'tools/cpm/format.sh')
| -rwxr-xr-x | tools/cpm/format.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/cpm/format.sh b/tools/cpm/format.sh new file mode 100755 index 0000000000..8d99b4796b --- /dev/null +++ b/tools/cpm/format.sh @@ -0,0 +1,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 |
