Git Product home page Git Product logo

Comments (7)

debarshiray avatar debarshiray commented on September 13, 2024 1

I went through documentation of Meson and there is a way to set
configuration options (the link is here).
But the expected way to use this mechanic is to feed it an input
config and then use the created config. If we want to use this we
need to make toolbox.sh read this kind of data from a separate config
file. Do we want that??

That would require having to build the final shell script from a toolbox.in, wouldn't it?

I think this is another of those things that are best addressed during the rewrite in Go, when we'd have to build the final binary from the sources anyway. The only positive aspect of a shell script is that it's self-contained and can be run straight out of the Git tree, without having to build it and so on. Let's not lose that.

from toolbox.

debarshiray avatar debarshiray commented on September 13, 2024

A --version flag is a reasonable thing to expect, and one would expect it to be easy. However, I can't think of a way to do this that:

  • Doesn't require building the final shell script from a toolbox.in to fill in the version number.

  • Doesn't require installing a second snippet with the version information that's sourced by the main script at run-time.

As archaic as shell scripts are, the ability to have a single self-contained file that can be run without an intermediate step is one of the more endearing aspects of it. It would be nice to not lose that.

Or maybe I am not being imaginative enough? :/

from toolbox.

fbruetting avatar fbruetting commented on September 13, 2024

I neither use Meson nor sh scripts, but can’t this be solved by an environment variable defined at the top, and maybe be fed via Meson?

from toolbox.

debarshiray avatar debarshiray commented on September 13, 2024

Umm... who will feed them in? Note that it has to work both for the (a) running straight out of Git or ./toolbox case, (b) built and installed, possibly via a distribution package, case.

from toolbox.

fbruetting avatar fbruetting commented on September 13, 2024

I think I would just add constants to that scripts. But I must say that I do not have an idea of shell scripts at all. :/

from toolbox.

HarryMichal avatar HarryMichal commented on September 13, 2024

I went through documentation of Meson and there is a way to set configuration options (the link is here). But the expected way to use this mechanic is to feed it an input config and then use the created config. If we want to use this we need to make toolbox.sh read this kind of data from a separate config file. Do we want that??

from toolbox.

debarshiray avatar debarshiray commented on September 13, 2024

Toolbox has now been rewritten in Go by @HarryMichal , and the Go version offers a --version flag.

from toolbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.