fix: bazzite-user-setup should only run when needed (#1020)

This commit is contained in:
Benjamin Sherman 2024-04-26 10:46:03 -05:00 committed by GitHub
parent 8c544aec06
commit f33d1e799a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,7 +33,7 @@ USER_SETUP_FEDORA_VER_RAN=$(cat $USER_SETUP_FEDORA_VER_FILE)
USER_SETUP_IMAGE_VER_RAN=$(cat $USER_SETUP_IMAGE_VER_FILE)
# Run script if updated
if [[ -f $USER_SETUP_VER_FILE && -f $USER_SETUP_FEDORA_VER_RAN && -f $USER_SETUP_FEDORA_VER_FILE ]]; then
if [[ -f $USER_SETUP_VER_FILE && -f $USER_SETUP_FEDORA_VER_FILE && -f $USER_SETUP_FEDORA_VER_FILE ]]; then
if [[ $USER_SETUP_VER = "$USER_SETUP_VER_RAN" && $FEDORA_VERSION = "$USER_SETUP_FEDORA_VER_RAN" && $BASE_IMAGE_NAME = "$USER_SETUP_IMAGE_VER_RAN" ]]; then
echo "User setup v$USER_SETUP_VER has already run. Exiting..."
exit 0