aboutsummaryrefslogtreecommitdiff
path: root/tools/cpm/package/util/replace.sh
blob: 7141747a122348d001b18e32a9ce292bc216ce93 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh -e

# SPDX-FileCopyrightText: Copyright 2026 crueter
# SPDX-License-Identifier: LGPL-3.0-or-later

# Replace a specified package with a modified json.

jq --indent 4 --argjson repl "$2" ".\"$1\" *= \$repl" cpmfile.json >cpmfile.json.new
mv cpmfile.json.new cpmfile.json

echo "-- * -- Updated cpmfile.json"