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

inline source when srcdir contains white-spaces #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

praiskup
Copy link
Member

Please @gvvaughan and @sshambar, can you have a look?

@praiskup praiskup force-pushed the white-spaces branch 2 times, most recently from cf8a7b1 to c538d8b Compare October 21, 2016 11:49
Add new syntax for source inline:

  # set '$inline_source_dir' to `dirname "$0"/`
  inline_source_dir=`echo "$0" |${SED-sed} 's|[^/]*$||'`
  . "$inline_source_dir"/sourced-file

This version avoids "`"sth"`" like commands (nested quotes), while
we are now able to use inline-source script within directory
which pathname contains spaces.  As a side effect, we save some
fork() calls because the directory is constructed only once.

Related to github issue gnulib-modules#6.

* build-aux/inline-source: Move ourself to the new syntax,
document new syntax.
(func_include): Parse the new syntax, quote $progpath properly.
* build-aux/bootstrap.in: Use new syntax.
* bootstrap: Sync with new sources.
@praiskup
Copy link
Member Author

@sshambar, the reasoning behind this pull request is that your pull request uses the nested double-quotes interleaved with nested command, which is not that portable.

On the other hand, your version will probably work most of the time -> so it would on user's consideration to pick the portable-enough version.... so I wouldn't be against adding both of the new include syntaxes. Also, there are still some nits in this pull-request compared to yours, so I am curious whether you would find some time to add the 'inline_source_dir' approach into your pull-request, and switching the boostrap.in default into inline_source_dir. I would be very happy to close this unmerged...

I'm very sorry for the delay, btw.

praiskup added a commit that referenced this pull request Apr 24, 2017
Fixes github issue #8.  Thanks to Reuben Thomas.

* README.md: s/let it initialized/let it be initialized/.
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.

1 participant