mirror of
https://github.com/neoromantique/dotfiles.git
synced 2026-04-10 04:58:07 +03:00
14 lines
211 B
Bash
14 lines
211 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
if [ "$#" -ne 2 ]; then
|
|
echo "usage: qs-json-write <path> <json>" >&2
|
|
exit 2
|
|
fi
|
|
|
|
path="$1"
|
|
payload="$2"
|
|
|
|
mkdir -p "$(dirname "$path")"
|
|
printf '%s' "$payload" > "$path"
|