Browse Source

Use the install command instead of raw cp/mv/chmod. #27

Abdullah ibn Nadjo 7 years ago
parent
commit
26f79b761a
1 changed files with 6 additions and 8 deletions
  1. 6
    8
      Makefile

+ 6
- 8
Makefile View File

@@ -18,17 +18,15 @@ endif
18 18
 	help2man $(MANFLAGS) ./light | gzip - > light.1.gz
19 19
 
20 20
 install: light man
21
-	mkdir -p $(BINDIR)
22
-	cp -f ./light $(BINDIR)/light
23
-	chown root $(BINDIR)/light
24
-	chmod 4755 $(BINDIR)/light
25
-	mkdir -p $(MANDIR)
26
-	mv light.1.gz $(MANDIR)
21
+	install -dZ $(BINDIR)
22
+	install -DZ -m 4755 ./light -t $(BINDIR)
23
+	install -dZ $(MANDIR)
24
+	install -DZ light.1.gz -t $(MANDIR)
27 25
 
28 26
 uninstall:
29
-	rm $(BINDIR)/light
27
+	rm -f $(BINDIR)/light
30 28
 	rm -rf /etc/light
31
-	rm $(MANDIR)/light.1.gz
29
+	rm -f $(MANDIR)/light.1.gz
32 30
 
33 31
 clean:
34 32
 	rm -vfr *~ light light.1.gz