From c3e04b1a9d92ee1d61030824e206b83cd2878b0e Mon Sep 17 00:00:00 2001 From: Ian Leonard Date: Sat, 23 Jan 2021 09:03:17 +0000 Subject: [PATCH] tools/packages-checker: initial commit Signed-off-by: Ian Leonard --- tools/packages-checker | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 tools/packages-checker diff --git a/tools/packages-checker b/tools/packages-checker new file mode 100755 index 0000000000..63b56a71f2 --- /dev/null +++ b/tools/packages-checker @@ -0,0 +1,15 @@ +#!/bin/bash + +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2020-2021 Ian Leonard (antonlacon@gmail.com) + +# This performs an automated scan with corrections to the packages feed to +# follow certain coding standards used in the project. Corrections are grouped +# by the subdirectory within the packages feed, and then commited. + +for directory in $(find packages/ -mindepth 1 -maxdepth 1 -type d | sort); do + for file in $(find "${directory}" -type f -name "package.mk" | sort); do + tools/fixlecode.py -qw -f "${file}" + done + git commit -qs -m "${directory##*/}: automated code cleanup" "${directory}" +done