Skip to content

Commit

Permalink
Fixed install and shell not handling file paths with spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
lfkeitel committed Dec 18, 2015
1 parent 2afc51f commit 732baf5
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ all:
.PHONY: install
install: sysreport
# Make destination directories if needed
$(shell [ ! -d $(destconf) ] && mkdir -p $(destconf))
$(shell [ ! -d $(destbin) ] && mkdir -p $(destbin))
$(shell [ ! -d $(destman) ] && mkdir -p $(destman))
$(shell [ ! -d "$(destconf)" ] && mkdir -p "$(destconf)")
$(shell [ ! -d "$(destbin)" ] && mkdir -p "$(destbin)")
$(shell [ ! -d "$(destman)" ] && mkdir -p "$(destman)")

install sysreport $(destbin)
install sysreport "$(destbin)"

# Install and setup configuration file
install -m644 -T sysreporter.conf.sample $(destconf)/sysreporter.conf
@echo "export REPORTSDIR=\"$(confdir)/reports.d\"" >> $(destconf)/sysreporter.conf
@echo "export TEMPDIR=\"/tmp/sysreporter\"" >> $(destconf)/sysreporter.conf
install -m644 -T sysreporter.conf.sample "$(destconf)/sysreporter.conf"
@echo "export REPORTSDIR=\"$(confdir)/reports.d\"" >> "$(destconf)/sysreporter.conf"
@echo "export TEMPDIR=\"/tmp/sysreporter\"" >> "$(destconf)/sysreporter.conf"

# Install and enable default reports
install -d $(destreportsdir)
install -m644 -D reports.d/* $(destreportsdir)
chmod +x $(destreportsdir)/3*
install -d "$(destreportsdir)"
install -m644 -D reports.d/* "$(destreportsdir)"
install -D reports.d/3* "$(destreportsdir)"

# Install manpage
install -m644 sysreport.1 $(destman)
install -m644 sysreport.1 "$(destman)"

0 comments on commit 732baf5

Please sign in to comment.