-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Simplify install.sh (take 2) #16829
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify install.sh (take 2) #16829
Conversation
|
Please update the same pr instead of opening new one everytime. |
|
Sorry, I'll keep that in mind next time. |
|
@staticfloat #8024 was 2 years ago, but do you have any recollection why |
|
Nevermind Elliot. @albap see all the Travis failures. |
|
I don't understand why it fails. Can you help? |
|
I believe it's because If that is the case, a |
|
@staticfloat |
|
would |
|
Passed Travis CI. |
|
edit: wrong pr, sorry |
|
@albap I'd really like to preserve normal To test for a directly without relying on if [ -d "$DEST" ]; then
DESTFILE="$DEST/$(basename "$SRC")"
else
DESTFILE="$DEST"
fiAlso, please make sure to always quote filename variables as they may contain spaces. I realize we weren't doing that before, but we probably should be. |
|
@staticfloat |
Agreed, and I'm glad that you are cleaning it up! I would prefer it if this PR was finished and merged, as I'd like to reward you for your work and attention for detail. Additionally, it's actually helpful for us to have new people helping out, even with small matters like this, so don't get discouraged when we bring up a multitude of small issues that tweak and twist the PR; that means we're paying attention to your work and ensuring that it will pass through the multitude of requirements necessary to get something like this working on lots of platforms. |
|
Thanks for the kind words, I really appreciate it and all the attention given to this! |
|
@staticfloat satisfied with this version? my ocd would prefer if the indentation were consistent, but functionality-wise it seems to work. |
|
@tkelman I think we shouldn't care about indentation consistency right now. All .sh scripts in the repository have their own indentation and naming style. |
|
at least within the same short script it makes sense to be internally consistent. I agree that global style tweaks can be done separately. |
|
Is it okay now? |
|
Thanks for your contribution @albap! |
You were depending on a non-standard cp flag (-v) and requiring two external utils (sed and tail) to do something really simple.
And then, because some unix utilities print 'a' -> 'b' while others print a -> b (and others print nothing because -v isn't posix) you would check if the output of cp contained the quote or not and remove it. (depending on even more tools like awk).
Forgive me if I'm wrong, but this deserves a serious ''what the hell''
Come on...