Skip to content
This repository was archived by the owner on Mar 27, 2024. It is now read-only.

DOC: use -p with mkdir ~/bin since might exist already #150

Merged
merged 1 commit into from
Nov 27, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ curl -LO https://storage.googleapis.com/container-diff/latest/container-diff-lin
OR, if you want to avoid using sudo:

```shell
curl -LO https://storage.googleapis.com/container-diff/latest/container-diff-linux-amd64 && chmod +x container-diff-linux-amd64 && mkdir $HOME/bin && export PATH=$PATH:$HOME/bin && mv container-diff-linux-amd64 $HOME/bin/container-diff
curl -LO https://storage.googleapis.com/container-diff/latest/container-diff-linux-amd64 && chmod +x container-diff-linux-amd64 && mkdir -p $HOME/bin && export PATH=$PATH:$HOME/bin && mv container-diff-linux-amd64 $HOME/bin/container-diff
Copy link
Contributor

@r2d4 r2d4 Nov 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change LGTM, but shouldn't we be downloading to /usr/local/bin or something other than $HOME/bin, which isn't standard? We can remove the $PATH modifying too, which won't work for new shells @nkubala

Copy link
Contributor Author

@yarikoptic yarikoptic Nov 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a snippet for /usr/local/bin installation already (via sudo, since user might not have permissions to mess with it as well).
I am curious -- what did you mean by $PATH modifying ... won't work for new shells?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to add export PATH=$PATH:$HOME/bin to your bashrc or a similar startup script, otherwise when you open a new shell, the path variable won't include your changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, I just misread your statement, and by "new shells" meant really new types of shells etc, not just new shell sessions. Thanks for the explanation.
yeah -- in my case PATH already includes ~/bin ;)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this is just a second option if users don't want to use sudo to copy to /usr/local/bin or another shared directory.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sorry, didn't see that!

```

### Windows
Expand Down