https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
7 lines
230 B
Bash
7 lines
230 B
Bash
export group="${AZURE_RESOURCE_GROUP:-"azure"}"
|
|
export location="${AZURE_LOCATION:-"westus2"}"
|
|
|
|
img_file=$(echo azure/*.vhd)
|
|
img_name="$(basename "${img_file}")"
|
|
img_name="${img_name%".vhd"}"
|
|
export img_name="${img_name//[._]/-}"
|