Skip to content

Commit a7bef05

Browse files
authored
Merge pull request #78 from dacrystal/topic/non-root
Installation enhancement
2 parents 7952772 + 3bffde5 commit a7bef05

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PREFIX ?= /usr/local
2-
BASH_COMPLETION_DIR := $(shell pkg-config --silence-errors --variable=completionsdir bash-completion)
2+
BASH_COMPLETION_DIR ?= $(shell pkg-config --silence-errors --variable=completionsdir bash-completion)
33
USERDIR ?= $(HOME)
44

55
# The @ symbols make the output silent.

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,15 @@ This is just one tool in the chain. `notes` is a command line tool, and some peo
2424
### Automatic:
2525

2626
```bash
27-
curl -L https://raw.githubusercontent.com/pimterry/notes/latest-release/install.sh | bash
27+
curl -L https://raw.githubusercontent.com/pimterry/notes/latest-release/install.sh | sudo bash
2828
```
2929
This will install `notes`, a default configuration, a man page, and bash completion if possible.
3030

31+
```bash
32+
curl -L https://raw.githubusercontent.com/pimterry/notes/latest-release/install.sh | PREFIX=$HOME bash
33+
```
34+
For non-root installation(user directory).
35+
3136
### Manual:
3237

3338
Download `notes`, `chmod +x`, put it in your `$path`. This will probably do it:

install.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22

33
# This is an install script for notes
44

5-
# Yay, Echo self documents! :D
6-
echo "Checking for root..."
7-
[ "$(whoami)" != "root" ] && exec sudo -- "$0" -s -- "$@"
8-
95
# This has to be defined after root elevation or script will fail.
106
function assertInstalled() {
117
for var in "$@"; do

0 commit comments

Comments
 (0)