Using variables during repository creation

Hi Team,

Can we use variables in repository setting for location setting. I am defing below but its not working.
"type": "fs",
"settings": {
"compress": true,
"location": "$BK_LOC/$SHARD_DIR"

The variables are already declared during the script execution.

How is it not working? Are you getting more errors?
Have you tried using set -x to debug your script?

I am getting below when we run in debug mode:

Check the status of the repository
"director" : {
"type" : "fs",
"settings" : {
"compress" : "true",
"location" : "$BK_LOC/$SHARD_DIR"

in the locaton i am not getting path to store . Getting the variable as it is. How can we solve this.

Linking to your script would help.

Linking in the sense replacing $BK_LOC/$SHARD_DIR with acutal location ? or any other way we have ?

Show us your code.

The problem is that your string is single quoted, and shell script variables aren't expanded within single quoted strings. Make them double quoted instead, and remember to escape the double quotes in the JSON payload.

Thank you magnusbaeck . Its working