aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-08-23 21:17:40 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-08-23 21:17:40 -0400
commit99d39587152deef8de232cc28ec6fe453b9568c9 (patch)
treef8bee2cd44442deed41121c243dd6ad499be134a
parentfde120bfe075ec47e7739faca8449f85b29156fd (diff)
Check if user can write to dir instead of checking for owner
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 2fc19ada..767a1652 100644
--- a/Makefile
+++ b/Makefile
@@ -78,7 +78,7 @@ LDLIBS=-lgc -lm -lunistring -lgmp
LIBTOMO_FLAGS=-shared
DEFINE_AS_OWNER=as_owner() { \
- if [ "$$USER" = "$(OWNER)" ]; then \
+ if [ -w '$(PREFIX)' ]; then \
"$$@"; \
else \
$(SUDO) -u "$(OWNER)" "$$@"; \