Skip to content

Commit

Permalink
Changes suggested for pull request.
Browse files Browse the repository at this point in the history
  • Loading branch information
primis committed Apr 4, 2017
1 parent 8c13697 commit 50889d5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
13 changes: 6 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ BASH_COMPLETION_DIR := $(strip $(BASH_COMPLETION_DIR))
USERDIR ?= $(HOME)

# The @ symbols make the output silent.
# the \033[0m stuff is ansi color escape codes.

install:
@if [ -d $(BASH_COMPLETION_DIR) ]; then \
Expand All @@ -19,13 +18,13 @@ install:
@install -m755 -D notes $(PREFIX)/bin/notes
@install -m777 -D config $(USERDIR)/.config/notes/config
@install -D notes.1 $(PREFIX)/share/man/man1/notes.1
@mandb 1>/dev/nulli 2>&1 # Fail silently if we don't have a mandb
@echo -e "Notes has been installed to \033[0;32m$(PREFIX)/bin/notes." \
"\n\033[0mA configuration file has also been created at" \
"\033[0;32m$(USERDIR)/.config/notes/config,\033[0m" \
@mandb 1>/dev/null 2>&1 # Fail silently if we don't have a mandb
@echo -e "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." \
"\nGet started now by running \033[0;32mnotes open my-new-note\033[0m" \
"Or you can run \033[0;32mnotes help\033[0m for more info"
"\nGet started now by running notes open my-new-note" \
"Or you can run notes help for more info"

uninstall:
rm -f $(PREFIX)/bin/notes
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ You'll need to open a new shell for this to take effect.
## What if I want to uninstall this?
If you used the automated install script to install notes, you can uninstall it the same way by running:
```bash
export uninstall=1 && curl https://rawgit.com/pimterry/notes/master/install.sh | bash
curl https://rawgit.com/pimterry/notes/master/install.sh | bash -s uninstall
```

## How do I configure this?
Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ extract_dir=$(mktemp -d /tmp/notes.XXXXX)

echo "Downloading and Extracting Notes from Repository..."
curl -L https://api.github.com/repos/pimterry/notes/tarball | tar -xzp -C $extract_dir --strip-components=1
if [ "$uninstall" != "1" ]; then
if [ "$1" != "uninstall" ]; then
echo "Installing notes..."
cd $extract_dir && make USERDIR=$user_home
else
Expand Down

0 comments on commit 50889d5

Please sign in to comment.