]> git.armaanb.net Git - dwmblocks.git/commitdiff
Change `cp`/`chmod` to `install`
authorKian Kasad <kdkasad@gmail.com>
Mon, 4 May 2020 08:20:45 +0000 (01:20 -0700)
committerGitHub <noreply@github.com>
Mon, 4 May 2020 08:20:45 +0000 (01:20 -0700)
The install command was meant for exactly this purpose; installing a file to a location and setting its permissions. This combines the `cp` and `chmod` commands into one `install` command.

Makefile

index c45a56304b928a426a4e50892cda3d56b5b61c4a..5f2bb98d143bfdbe18c8abb71cc3def859b46a33 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,6 @@ clean:
        rm -f *.o *.gch dwmblocks
 install: output
        mkdir -p $(DESTDIR)$(PREFIX)/bin
-       cp -f dwmblocks $(DESTDIR)$(PREFIX)/bin
-       chmod 755 $(DESTDIR)$(PREFIX)/bin/dwmblocks
+       install -m 0755 dwmblocks $(DESTDIR)$(PREFIX)/bin/dwmblocks
 uninstall:
        rm -f $(DESTDIR)$(PREFIX)/bin/dwmblocks