diff --git a/PROTOCOL.md b/PROTOCOL.md index ebb561e..f62e3ee 100644 --- a/PROTOCOL.md +++ b/PROTOCOL.md @@ -98,6 +98,7 @@ is alive, determine the version at startup, and provide per-store defaults.    “status”: “ok”,    “version”:    “response”: { + "defaultPath": "/path/to/default/store",        “storeSettings”: {            “storeName”:        } diff --git a/placeholder.sh b/placeholder.sh index 5d054cc..85d04c9 100755 --- a/placeholder.sh +++ b/placeholder.sh @@ -93,7 +93,9 @@ function configure() fi done - OUTPUT='{}' + [ -n "$PASSWORD_STORE_DIR" ] || PASSWORD_STORE_DIR="~/.password-store" + OUTPUT="$(jq -n --arg defaultPath "$PASSWORD_STORE_DIR" '.defaultPath = $defaultPath')" + for STORE in "${!STORES[@]}"; do OUTPUT=$(jq --arg store "$STORE" --arg settings "${STORES[$STORE]}" '.storeSettings[$store] = $settings' <<< "$OUTPUT") done