aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authordacctal <dacctal@symlinx.net>2026-05-28 19:55:36 +0000
committerdacctal <dacctal@symlinx.net>2026-05-28 19:55:36 +0000
commit760948a0a9b76fbc721aae17b0170d75f68acd85 (patch)
tree89a4e610658e793088513e2ba485f7c572d209b2 /Makefile
parentf2dec056860d6f6d24952d222d9d6727bb6f2430 (diff)
fixed some permission issues with the config
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 4c9f192..98fe87a 100644
--- a/Makefile
+++ b/Makefile
@@ -30,10 +30,11 @@ uninstall: ${DESTDIR}${PREFIX}/bin/pkgit
${RM} ${DESTDIR}${PREFIX}/bin/pkgit
defconfig:
- @echo "Installing default config to ~/.config/pkgit ..."
- @mkdir -p ~/.config/pkgit
- @cp -r ./config/* ~/.config/pkgit/
- @echo "default config installed"
+ @if [ "$$(id -u)" -eq 0 ]; then dir=/etc/pkgit; else dir=~/.config/pkgit; fi; \
+ echo "installing default config to $$dir ..."; \
+ mkdir -p $$dir; \
+ cp -r ./config/* $$dir/; \
+ echo "default config installed"
clean:
${RM} -r $(OBJDIR) pkgit