Skip to content
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

convert bootstrap.sh to POSIX (untested) #32

Closed
wants to merge 1 commit into from

Conversation

grimreaper
Copy link

It is not safe to rely on bash existing, let alone /bin/bash being the location of the binary.

It is considered unsafe to script ls. This is why find exists.

Quote all files.

Convert bootstrap.sh to POSIX sh

It is not safe to rely on bash existing, let alone /bin/bash being the location of the binary.

It is considered unsafe to script ls.  This is why find exists.

Quote all files.

Convert bootstrap.sh to POSIX sh
@spencerkimball
Copy link
Member

Mr Reaper,

Thank you for the PR. I'm trying to get someone with more knowledge about shell scripting to do the code review. Is there any chance you could submit it through the normal PR mechanism we use? Details are here: https://github.com/cockroachdb/cockroach/blob/master/CONTRIBUTING.md

The key point is we use Phabricator. Not really necessary for a PR this size though, but we'd like to standardize on that channel for posterity.

rm .git/hooks/$(basename $f)
ln -s ../../$f .git/hooks/$(basename $f)
done && ls -al .git/hooks | grep githooks
for f in $(find githooks -mindepth 1 -maxdepth 1); do
Copy link
Collaborator

Choose a reason for hiding this comment

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

I thought the $(...) construction was a bash-ism. Don't you have to use backquotes in plain shell?

@andybons
Copy link
Contributor

@grimreaper ping on this.

@grimreaper
Copy link
Author

I've been busy, but have this in my 'open source TODO queue'.

On 16 August 2014 08:36, Andrew Bonventre notifications@github.com wrote:

@grimreaper https://github.com/grimreaper ping on this.


Reply to this email directly or view it on GitHub
#32 (comment).

@spencerkimball
Copy link
Member

bootstrap.sh has changed so significantly lately that I'm going to close this PR. The same objections apply to the current implementation (as well as a growing body of additional shell scripts unfortunately).

soniabhishek pushed a commit to soniabhishek/cockroach that referenced this pull request Feb 15, 2017
Persistent channel using rabbitmq & better logging
pav-kv pushed a commit to pav-kv/cockroach that referenced this pull request Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants