Files
neoromantique-dotfiles/home/dot_local/bin/executable_qs-json-write
David Aizenberg f1f2ba2bbe sync
2026-03-17 20:08:29 +01:00

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"