Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix makefile systemd comment #84

Merged
merged 1 commit into from
Jan 2, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ CLAD_SYSTEMD_DEVEL_PATH := $(DATA_DEVELOPMENT_PATH)/systemd/clad-devel.service
CLAD_SYSTEMD_USER_PATH := $(DATA_DEVELOPMENT_PATH)/systemd/clad-user.service
# Systemd path on the system to place the user unit
SYSTEMD_USER_UNITS := ~/.config/systemd/user
# SYSTEMD_USER_UNITS := /etc/systemd/user
# Path to local XDG_CONFIG_DIRS to load config file
XDG_CONFIG_DIRS := $(subst /,\/,$(DATA_DEVELOPMENT_PATH)/config)

Expand Down Expand Up @@ -82,15 +81,15 @@ clean: ## Clean project files
junit.xml \
coverage.xml

link-systemd-units: ## Link the systemd units to /etc/systemd/user
link-systemd-units: ## Link the systemd units to ~/.config/systemd/user
@echo "Linking the systemd units from $(CLAD_SYSTEMD_DEVEL_PATH) to $(SYSTEMD_USER_UNITS)/clad.service"
@sed -e 's/{{ EXEC_START }}/$(CLAD_VENV_BIN)/' \
-e 's/{{ CONFIG_FILE_PATH }}/$(XDG_CONFIG_DIRS)/' \
-e 's/{{ DBUS_SESSION_ADDRESS }}/$(subst /,\/,$(DBUS_SESSION_BUS_ADDRESS))/' \
$(CLAD_SYSTEMD_DEVEL_PATH) > $(CLAD_SYSTEMD_USER_PATH)
@ln -s $(CLAD_SYSTEMD_USER_PATH) $(SYSTEMD_USER_UNITS)/clad.service

unlink-systemd-units: ## Unlink the systemd units from /etc/systemd/user
unlink-systemd-units: ## Unlink the systemd units from ~/.config/systemd/user
@echo "Unlinking the systemd units from $(SYSTEMD_USER_UNITS)/clad.service"
@unlink $(SYSTEMD_USER_UNITS)/clad.service

Expand Down
Loading