summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrtan Samos <drtan@lavabit.com>2013-04-21 15:58:33 +0200
committerEsteban Carnevale <alfplayer@mailoo.org>2013-09-02 20:03:36 -0300
commit654d8bba202b0a1827a652d5f2c9979f0814ad6a (patch)
tree1768313db7b3a335221f7ae10639e41afb3e9af0
parent5c6a51b437f7aa5395a3bb68df28a0728d8dd1ee (diff)
Prevents errors when file paths contain spaces.
-rw-r--r--Makefile35
1 files changed, 16 insertions, 19 deletions
diff --git a/Makefile b/Makefile
index e4f0b04..cb5f9e4 100644
--- a/Makefile
+++ b/Makefile
@@ -7,9 +7,6 @@ SCRIPT_SRC_DIR=parabolaiso/initcpio/script
INSTALL_DIR=$(DESTDIR)/usr/lib/initcpio/install
HOOKS_DIR=$(DESTDIR)/usr/lib/initcpio/hooks
SCRIPT_DIR=$(DESTDIR)/usr/lib/initcpio
-
-DOC_FILES=$(wildcard docs/*)
-
DOC_DIR=$(DESTDIR)/usr/share/doc/parabolaiso
@@ -18,38 +15,38 @@ all: install dist
install: install-program install-initcpio install-examples install-doc
install-program:
- install -D -m 755 parabolaiso/mkparabolaiso $(DESTDIR)/usr/sbin/mkparabolaiso
+ install -D -m 755 parabolaiso/mkparabolaiso "$(DESTDIR)/usr/sbin/mkparabolaiso"
install-initcpio:
- install -d $(SCRIPT_DIR) $(HOOKS_DIR) $(INSTALL_DIR)
- install -m 755 -t $(SCRIPT_DIR) $(wildcard $(SCRIPT_SRC_DIR)/*)
- install -m 644 -t $(HOOKS_DIR) $(wildcard $(HOOKS_SRC_DIR)/*)
- install -m 644 -t $(INSTALL_DIR) $(wildcard $(INSTALL_SRC_DIR)/*)
+ install -d "$(SCRIPT_DIR)" "$(HOOKS_DIR)" "$(INSTALL_DIR)"
+ install -m 755 -t "$(SCRIPT_DIR)" $(wildcard $(SCRIPT_SRC_DIR)/*)
+ install -m 644 -t "$(HOOKS_DIR)" $(wildcard $(HOOKS_SRC_DIR)/*)
+ install -m 644 -t "$(INSTALL_DIR)" $(wildcard $(INSTALL_SRC_DIR)/*)
install-examples:
- install -d -m 755 $(DESTDIR)/usr/share/parabolaiso/
- cp -a --no-preserve=ownership configs $(DESTDIR)/usr/share/parabolaiso/
+ install -d -m 755 "$(DESTDIR)/usr/share/parabolaiso/"
+ cp -a --no-preserve=ownership configs "$(DESTDIR)/usr/share/parabolaiso/"
install-doc:
- install -d $(DOC_DIR)
- install -m 644 -t $(DOC_DIR) $(DOC_FILES)
+ install -d "$(DOC_DIR)"
+ install -m 644 -t "$(DOC_DIR)" $(wildcard docs/*)
uninstall: uninstall-program uninstall-initcpio uninstall-examples uninstall-doc
uninstall-program:
- rm $(DESTDIR)/usr/sbin/mkparabolaiso
+ rm "$(DESTDIR)/usr/sbin/mkparabolaiso"
uninstall-initcpio:
- @$(foreach file,$(wildcard $(SCRIPT_SRC_DIR)/*),rm -r $(subst $(SCRIPT_SRC_DIR),$(SCRIPT_DIR),$(file));)
- @$(foreach file,$(wildcard $(HOOKS_SRC_DIR)/*),rm -r $(subst $(HOOKS_SRC_DIR),$(HOOKS_DIR),$(file));)
- @$(foreach file,$(wildcard $(INSTALL_SRC_DIR)/*),rm -r $(subst $(INSTALL_SRC_DIR),$(INSTALL_DIR),$(file));)
+ $(foreach file,$(wildcard $(SCRIPT_SRC_DIR)/*),rm -r "$(subst $(SCRIPT_SRC_DIR),$(SCRIPT_DIR),$(file))";)
+ $(foreach file,$(wildcard $(HOOKS_SRC_DIR)/*),rm -r "$(subst $(HOOKS_SRC_DIR),$(HOOKS_DIR),$(file))";)
+ $(foreach file,$(wildcard $(INSTALL_SRC_DIR)/*),rm -r "$(subst $(INSTALL_SRC_DIR),$(INSTALL_DIR),$(file))";)
uninstall-examples:
- rm -rfd $(DESTDIR)/usr/share/parabolaiso/configs
- rm -d $(DESTDIR)/usr/share/parabolaiso
+ rm -rfd "$(DESTDIR)/usr/share/parabolaiso/configs"
+ rm -d "$(DESTDIR)/usr/share/parabolaiso"
uninstall-doc:
- rm -rf $(DOC_DIR)
+ rm -rf "$(DOC_DIR)"
dist:
git archive --format=tar --prefix=parabolaiso-$(V)/ v$(V) | gzip -9 > parabolaiso-$(V).tar.gz