aboutsummaryrefslogtreecommitdiff
path: root/tools/cpm/which.sh
blob: c936d0a97f687aea7d7d8c89e3984c1ab5f1b5ba (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

# check which file a package is in
# shellcheck disable=SC1091
. tools/cpm/common.sh

# shellcheck disable=SC2086
JSON=$(find $DIRS -maxdepth "$MAXDEPTH" -name cpmfile.json -exec grep -l "$1" {} \;)

[ -z "$JSON" ] && echo "!! No cpmfile definition for $1"

echo "$JSON"