Files
eden/tools/cpm/package/util/replace.sh
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
317 B
Bash
Raw Normal View History

2025-12-31 17:16:46 +01:00
#!/bin/sh -e
2026-06-26 02:22:04 +02:00
# SPDX-FileCopyrightText: Copyright 2026 crueter
2025-12-31 17:16:46 +01:00
# SPDX-License-Identifier: LGPL-3.0-or-later
# Replace a specified package with a modified json.
2026-06-26 02:22:04 +02:00
jq --indent 4 --argjson repl "$2" ".\"$1\" *= \$repl" cpmfile.json >cpmfile.json.new
mv cpmfile.json.new cpmfile.json
2025-12-31 17:16:46 +01:00
2026-06-26 02:22:04 +02:00
echo "-- * -- Updated cpmfile.json"