summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2019-05-01 21:21:02 -0400
committerLuke Smith <luke@lukesmith.xyz>2019-05-01 21:21:02 -0400
commit8d38c10a206ac49686e654b2c98772e717c7a3d5 (patch)
tree85e08dac900290b6170550d9b8ccf4a30d0910b3
parenta4a9e8746f820f577138737af737fabe0d9e30b7 (diff)
loop in makefile
-rw-r--r--Makefile21
1 files changed, 8 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index 6a4ee2e..7595861 100644
--- a/Makefile
+++ b/Makefile
@@ -5,26 +5,21 @@ MANPREFIX = $(PREFIX)/share/man
install:
mkdir -p $(DESTDIR)$(PREFIX)/bin
- cp -f bin/mw $(DESTDIR)$(PREFIX)/bin
- chmod 755 $(DESTDIR)$(PREFIX)/bin/mw
- cp -f bin/openfile $(DESTDIR)$(PREFIX)/bin
- chmod 755 $(DESTDIR)$(PREFIX)/bin/openfile
- cp -f bin/muttimage $(DESTDIR)$(PREFIX)/bin
- chmod 755 $(DESTDIR)$(PREFIX)/bin/muttimage
- cp -f bin/mailsync $(DESTDIR)$(PREFIX)/bin
- chmod 755 $(DESTDIR)$(PREFIX)/bin/mailsync
+ for script in bin/*; do \
+ cp -f $$script $(DESTDIR)$(PREFIX)/bin/; \
+ chmod 755 $(DESTDIR)$(PREFIX)/$$script; \
+ done
mkdir -p $(DESTDIR)$(PREFIX)/share/mutt-wizard
- mkdir -p $(DESTDIR)$(MANPREFIX)/man1
cp -f mailcap $(DESTDIR)$(PREFIX)/share/mutt-wizard
cp -f mutt-wizard.muttrc $(DESTDIR)$(PREFIX)/share/mutt-wizard
cp -f domains.csv $(DESTDIR)$(PREFIX)/share/mutt-wizard
+ mkdir -p $(DESTDIR)$(MANPREFIX)/man1
cp -f mw.1 $(DESTDIR)$(MANPREFIX)/man1/mw.1
uninstall:
- rm -f $(DESTDIR)$(PREFIX)/bin/mw
- rm -f $(DESTDIR)$(PREFIX)/bin/mailsync
- rm -f $(DESTDIR)$(PREFIX)/bin/openfile
- rm -f $(DESTDIR)$(PREFIX)/bin/muttimage
+ for script in bin/*; do \
+ rm -f $(DESTDIR)$(PREFIX)/bin/$$script; \
+ done
rm -rf $(DESTDIR)$(PREFIX)/share/mutt-wizard
.PHONY: install uninstall