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
commit6286e1db0b56c6cefa5517f9286b8c26364715d8 (patch)
tree5aaab7e0ddb197707aba92ccc9841b476c939006
parentOpenBSD: Copy appropriate files for chroot (diff)
downloadtorus-6286e1db0b56c6cefa5517f9286b8c26364715d8.tar.gz
torus-6286e1db0b56c6cefa5517f9286b8c26364715d8.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