about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-09-27 02:17:27 +0000
committerJune McEnroe <june@causal.agency>2021-09-27 02:17:27 +0000
commit5c7efd60e227ebd92f2078fb049502a64f3b3924 (patch)
tree69c36fe9325a280e7da3b613ad95dd68ac95fac1
parentOpenBSD: Copy appropriate files for chroot (diff)
downloadtorus-5c7efd60e227ebd92f2078fb049502a64f3b3924.tar.gz
torus-5c7efd60e227ebd92f2078fb049502a64f3b3924.zip
Extract chroot.tar with -p, install to WEBROOT
Diffstat (limited to '')
-rw-r--r--Makefile10
1 files changed, 5 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 61e5df2..0f940ed 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,6 @@
 CHROOT_USER = torus
 CHROOT_GROUP = ${CHROOT_USER}
+WEBROOT = /var/www/ascii.town
 
 CFLAGS += -std=c11 -Wall -Wextra -Wpedantic
 LDFLAGS = -static
@@ -46,12 +47,11 @@ chroot.tar: client image server default8x16.psfu
 	tar -c -f chroot.tar -C root bin home usr var
 
 install: chroot.tar rc.torus explore.html index.html
-	tar -x -f chroot.tar -C /home/${CHROOT_USER}
-	install rc.torus /usr/local/etc/rc.d/torus
+	tar -px -f chroot.tar -C /home/${CHROOT_USER}
+	if test -d /usr/local/etc/rc.d; then \
+		install rc.torus /usr/local/etc/rc.d/torus; fi
 	install -o ${CHROOT_USER} -g ${CHROOT_GROUP} -m 644 \
-		explore.html \
-		index.html \
-		/usr/local/www/ascii.town
+		explore.html index.html ${WEBROOT}
 
 clean:
 	rm -fr ${OBJS} ${BINS} tags root chroot.tar