Skip to content

Commit

Permalink
don't overwrite config file during installation
Browse files Browse the repository at this point in the history
  • Loading branch information
tardypad committed Aug 30, 2017
1 parent 3583ec8 commit e98fb4c
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions Makefile
Expand Up @@ -14,21 +14,27 @@ If you have bash completion installed, follow the README \
(https://github.com/pimterry/notes#installing-bash-completion) \
to manually install it.\n\n"; \
fi # Small test for bash completion support

@install -m755 -d $(PREFIX)/bin/
@install -m755 notes $(PREFIX)/bin/
@install -m777 -d $(USERDIR)/.config/notes/
@install -m777 config $(USERDIR)/.config/notes/
@install -d $(PREFIX)/share/man/man1/
@install notes.1 $(PREFIX)/share/man/man1/

@mandb 1>/dev/null 2>&1 || true # Fail silently if we don't have a mandb

@printf "Notes has been installed to $(PREFIX)/bin/notes.\n"

@if [ ! -f $(USERDIR)/.config/notes/config ]; then \
install -m777 -d $(USERDIR)/.config/notes/; \
install -m777 config $(USERDIR)/.config/notes/; \
printf \
"A configuration file has also been created at $(USERDIR)/.config/notes/config, \
which you can edit if you'd like to change the default settings.\n"; \
fi # install default config file if non present

@printf \
"Notes has been installed to $(PREFIX)/bin/notes. \
A configuration file has also been created at $(USERDIR)/.config/notes/config, \
which you can edit if you'd like to change the default settings.\n\n\
Get started now by running 'notes new my-note' \
or you can run 'notes help' for more info.\n"
"\nGet started now by running 'notes new my-note' \
or you can run 'notes help' for more info.\n"; \

uninstall:
rm -f $(PREFIX)/bin/notes
Expand Down

0 comments on commit e98fb4c

Please sign in to comment.