scripts/lint-packages.sh: adapt to new repository structure

This commit is contained in:
Yaksh Bariya 2022-04-18 17:04:10 +05:30
parent 98fff5b520
commit 66af228cfe
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
1 changed files with 3 additions and 2 deletions

View File

@ -3,7 +3,6 @@
set -e -u
REPO_DIR=$(realpath "$(dirname "$0")/../")
PACKAGES_DIR="$REPO_DIR/packages"
check_package_license() {
local pkg_licenses=$1
@ -454,7 +453,9 @@ linter_main() {
}
if [ $# -eq 0 ]; then
linter_main "$PACKAGES_DIR"/*/build.sh || exit 1
for repo_dir in $(jq --raw-output 'keys | .[]' < $REPO_DIR/repo.json); do
linter_main $repo_dir/*/build.sh
done || exit 1
else
linter_main "$@" || exit 1
fi