mirror of
https://github.com/optim-enterprises-bv/secureblue.git
synced 2025-11-01 19:07:52 +00:00
16 lines
638 B
Diff
16 lines
638 B
Diff
61,74d60
|
|
< # Switch between Nvidia image and NVK
|
|
< toggle-nvk:
|
|
< #!/usr/bin/bash
|
|
< CURRENT_IMAGE=$(rpm-ostree status -b --json | jq -r '.deployments[0]."container-image-reference"' | sed -E 's/^.+\/(.+:.+)$/\1/')
|
|
< CURRENT_URI=$(rpm-ostree status -b --json | jq -r '.deployments[0]."container-image-reference"' | sed -E 's/^(.+\/).+:.+$/\1/')
|
|
< NEW_IMAGE=$CURRENT_IMAGE
|
|
< if [[ "$CURRENT_IMAGE" =~ "nvidia" ]]; then
|
|
< NEW_IMAGE=${CURRENT_IMAGE/-nvidia/}
|
|
< else
|
|
< NEW_IMAGE=${CURRENT_IMAGE/:/-nvidia:}
|
|
< fi
|
|
< echo "Rebasing to ${NEW_IMAGE}"
|
|
< rpm-ostree rebase ${CURRENT_URI}${NEW_IMAGE}
|
|
<
|