Skip to content

Commit c4670d2

Browse files
mulderjepull[bot]
andauthored
fix(bazzite-user-setup): include in file check and move after first if statement (#1023)
Follow-up from: #w1020 Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com>
1 parent 376f46c commit c4670d2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

system_files/desktop/shared/usr/libexec/bazzite-user-setup

+5-5
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ if [[ -f "$HOME/.bazzite-configured-fedora-version" ]]; then
2828
mv -f "$HOME/.bazzite-configured-fedora-version" "$USER_SETUP_FEDORA_VER_FILE"
2929
fi
3030

31-
USER_SETUP_VER_RAN=$(cat $USER_SETUP_VER_FILE)
32-
USER_SETUP_FEDORA_VER_RAN=$(cat $USER_SETUP_FEDORA_VER_FILE)
33-
USER_SETUP_IMAGE_VER_RAN=$(cat $USER_SETUP_IMAGE_VER_FILE)
34-
3531
# Run script if updated
36-
if [[ -f $USER_SETUP_VER_FILE && -f $USER_SETUP_FEDORA_VER_FILE && -f $USER_SETUP_FEDORA_VER_FILE ]]; then
32+
if [[ -f $USER_SETUP_VER_FILE && -f $USER_SETUP_FEDORA_VER_FILE && -f $USER_SETUP_IMAGE_VER_FILE ]]; then
33+
USER_SETUP_VER_RAN=$(cat $USER_SETUP_VER_FILE)
34+
USER_SETUP_FEDORA_VER_RAN=$(cat $USER_SETUP_FEDORA_VER_FILE)
35+
USER_SETUP_IMAGE_VER_RAN=$(cat $USER_SETUP_IMAGE_VER_FILE)
36+
3737
if [[ $USER_SETUP_VER = "$USER_SETUP_VER_RAN" && $FEDORA_VERSION = "$USER_SETUP_FEDORA_VER_RAN" && $BASE_IMAGE_NAME = "$USER_SETUP_IMAGE_VER_RAN" ]]; then
3838
echo "User setup v$USER_SETUP_VER has already run. Exiting..."
3939
exit 0

0 commit comments

Comments
 (0)