#!/bin/bash

# Remote
#ssh playtron@$GAMEOS_IP_ADDRESS sudo bootc image copy-to-storage
#export CONTAINER_TAG="$(date +"%Y-%m-%dT%H_%M_%S%z" | sed 's/+/-/g')"
#ssh playtron@$GAMEOS_IP_ADDRESS sudo podman build --tag desktop:${CONTAINER_TAG} .
#ssh playtron@$GAMEOS_IP_ADDRESS sudo bootc switch --transport containers-storage localhost/desktop:${CONTAINER_TAG}
#ssh playtron@$GAMEOS_IP_ADDRESS "sync && sudo reboot"

# Local
sudo bootc image copy-to-storage
export CONTAINER_TAG="$(date +"%Y-%m-%dT%H_%M_%S%z" | sed 's/+/-/g')"
rm -f Containerfile
wget https://winesapos.lukeshort.cloud/desktop/Containerfile
rm -f bootstrap-theme-remote.sh
wget https://winesapos.lukeshort.cloud/desktop/bootstrap-theme-remote.sh
sudo podman build --tag desktop:${CONTAINER_TAG} .
sudo bootc switch --transport containers-storage localhost/desktop:${CONTAINER_TAG}
sync && sudo reboot
