fix gitweb/set-owner
authorShane <chown_tee@proton.me>
Sun, 11 Jan 2026 02:31:07 +0000 (02:31 +0000)
committerShane <chown_tee@proton.me>
Sun, 11 Jan 2026 02:31:07 +0000 (02:31 +0000)
Makefile

index 6c504ef933ec182baaeefb0a233d81daacccb2a4..4b15fcdb706fcbf6f36171dcb53ef9d225242d33 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -121,7 +121,10 @@ ifndef OWNER
 endif
 ifdef SUDO_USER
        @echo "Setting owner as $(SUDO_USER)..."
-       su -P $(SUDO_USER) -c "bash scripts/set_gitweb_owner.sh '$(OWNER)'"
+       @cp -f scripts/set_gitweb_owner.sh /tmp/set_gitweb_owner.sh
+       @chmod +rx /tmp/set_gitweb_owner.sh
+       su -P $(SUDO_USER) -c "cd /tmp && bash /tmp/set_gitweb_owner.sh '$(OWNER)'"
+       @rm -f /tmp/set_gitweb_owner.sh
 else
        @echo "Setting owner..."
        bash scripts/set_gitweb_owner.sh "$(OWNER)"