diff --git a/fake_home/.zlogin b/fake_home/.zlogin index c88cf04..08e5ac7 100644 --- a/fake_home/.zlogin +++ b/fake_home/.zlogin @@ -1,11 +1,17 @@ -date >> "$HOME/.tmp/getdot-log" -echo "~/zlogin, babyyy" >> "$HOME/.tmp/getdot-log" +logfile="$HOME/.tmp/getdot-log" +# date >> "$logfile" +# echo "~/zlogin, babyyy" >> "$logfile" LOGIN_SYNC_DATE="$HOME/.bin/.login-dot-sync" touch $LOGIN_SYNC_DATE -current_date="$(date '+%D')" -if [[ "$current_date" != "$(cat "$LOGIN_SYNC_DATE")" ]]; then +login_sync_date="$(date '+%D')" +logged_date="$(cat "$LOGIN_SYNC_DATE")" + +if [[ "$login_sync_date" == "$logged_date" ]]; then + GETDOT_ARGS="--skip-dconf" source "$HOME/.zshrc" +else RUN_GETDOT="true" GETDOT_ARGS="--skip-dconf" source "$HOME/.zshrc" fi -echo "$current_date" > "$LOGIN_SYNC_DATE" + +echo "$login_sync_date" > "$LOGIN_SYNC_DATE"