Skip to content

Commit

Permalink
[fix] don't overwrite configuration file
Browse files Browse the repository at this point in the history
Only create a blank `swhkdrc` file if one does not exist already.
  • Loading branch information
TheLastZombie committed Mar 27, 2024
1 parent 5e8ebe3 commit b36f0c1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ install:
@install -Dm 755 ./target/release/$(SERVER_BINARY) -t $(DESTDIR)/$(TARGET_DIR)
@install -Dm 644 -o root ./$(POLKIT_POLICY_FILE) -t $(DESTDIR)/$(POLKIT_DIR)
# Ideally, we would have a default config file instead of an empty one
@touch ./$(DAEMON_BINARY)rc
@install -Dm 644 ./$(DAEMON_BINARY)rc -t $(DESTDIR)/etc/$(DAEMON_BINARY)
@if [ ! -f $(DESTDIR)/etc/$(DAEMON_BINARY)/$(DAEMON_BINARY)rc ]; then \
touch ./$(DAEMON_BINARY)rc; \
install -Dm 644 ./$(DAEMON_BINARY)rc -t $(DESTDIR)/etc/$(DAEMON_BINARY); \
fi

uninstall:
@$(RM) -f /usr/share/man/**/swhkd.*
Expand Down

0 comments on commit b36f0c1

Please sign in to comment.