jamesob / desk

A lightweight workspace manager for the shell
MIT License
2.54k stars 111 forks source link

New installation instructions require assuming root #30

Closed ofsaleem closed 8 years ago

ofsaleem commented 8 years ago

Hello,

Was wondering why you changed the installation instructions to use the curl method rather than the git clone + make method (especially with all that hard work I put into the Makefile QQ /s)

The reason I take issue with it is because (besides having to chmod +x it yourself)

curl https://raw.githubusercontent.com/jamesob/desk/master/desk > /usr/local/bin/desk

doesn't actually work unless you assume root. You can't just prepend sudo to that command since you're piping the output so you have to use either su or sudo su to become root and then use the curl command.

I'm assuming you changed it from git clone + make because it's easier to just download one file than mess with a whole directory. I get that, so I suggest changing it to either have sudo su at the top, or use:

sudo curl -o /usr/local/bin/desk https://raw.githubusercontent.com/jamesob/desk/master/desk
sudo chmod +x /usr/local/bin/desk

Again personally I think git clone + make is a tad bit easier/less annoying since you don't have to chmod the file but then you have to delete the directory so I guess it's up to you. Also the makefile installs to /usr/bin/desk and the curl command you list is /usr/local/bin/desk.

Sorry to nitpick so hard :P I want this baby in the AUR

jamesob commented 8 years ago

Hey, @ofsaleem. Thanks for the issue.

You (correctly) assume that I changed the instructions because curling a single file is a much simpler process than doing a full checkout of a git repository -- and doesn't require the dependency of having git installed on the target host. It is in line with the broader idea of having only a single dependency: bash.

Indeed in the literal instructions, root is required. I took it for granted that the intended audience here would be able to infer that /usr/local/bin isn't the only location a user may have on PATH, and so other (non-privileged) locations may be specified in lieu of it; my own installation has desk living in ~/bin. But because non-root PATH locations aren't standard, I felt bad specifying ~/bin or something similar.

Your good work on the Makefile still applies here, but it benefits only those who prefer a git checkout.

I'll update the Makefile to be consistent with the README, and will make a note about option for non-root installs.

If there's anything else I can do to aid getting this in AUR, lemme know. Otherwise, feel free to file PRs. :)

jamesob commented 8 years ago

Closing this out -- feel free to reply with any suggestions @ofsaleem.