Coder Social home page Coder Social logo

Comments (8)

brianamarie avatar brianamarie commented on August 14, 2024

Hello @smokeybreeze! The current use of the scripts is during class, to understand how students are doing. I think that their biggest value is for remote classes. I know that I would find any improvement valuable, and I'm sure other trainers would too. However, I don't know if it's critical or in the way of delivering courses as they are.

That being said, if you have the bandwidth to improve them, your contributions would be very appreciated. 👍

from training-manual.

amyschoen avatar amyschoen commented on August 14, 2024

@brianamarie, we have a similar thread going in our GHE instance. Here's what I posted as feedback to @smokeybreeze:

I scanned a bit of the file. Some are legitimate, and some aren't. We've done functional testing to ensure that this works on bash and git bash. Are you sure posix sh is the correct thing to validate against? I wouldn't want to make a lot of these fixes because they'd break base functionality in some cases.

My main concern is that @mblack88 and I did a bunch of changes and testing to make sure that things ran correctly in both bash and git bash. I'm wondering if we change from sh to bash explicitly and then rerun using bash validation instead of posix validation. Having way more code quality issues than lines of code seems excessive when the scripts work. Is there a reason why zsh is supported? That support is the only reason why I can see using sh instead of bash in the script header. If we only need to support bash, I see things becoming much simpler.

from training-manual.

smokeybreeze avatar smokeybreeze commented on August 14, 2024

We can significantly reduce the number of issues by replacing the #!/bin/sh shebang with #!/bin/bash. The shebang tells the operating system what interpreter to use to execute the script. If we changed the shebang to #!/bin/bash, the issues that remain are mostly related to double quoting variables to avoid globbing and word splitting which would not alter the current functionality of the scripts.

A lot of git users prefer the Z shell (zsh) because it supports git command expansion, so I think keeping support for adding "source $HOME/.trainingmanualrc" to both ~/.zshrc and ~/.bashrc is valuable, but that is a different user story altogether.

from training-manual.

mblack88 avatar mblack88 commented on August 14, 2024

from training-manual.

TheNotary avatar TheNotary commented on August 14, 2024

from training-manual.

smokeybreeze avatar smokeybreeze commented on August 14, 2024

The scripts are written using the Bourne Again SHell extensions. so setting the shebang to #!/bin/bash would be most accurate. Setting the shebang to the POSIX Bourne shell (#!/bin/sh) and not adhering to what is actually in the POSIX standard is relying on the operating system vendors to not strictly adhere to the POSIX standard. [[ ]] constructs, arrays, and the function keyword are just some bash extensions that are not provided in the POSIX standard, so technically these scripts should not run as written.

The bottom line is that we've already standardized on bash for these scripts.

from training-manual.

brianamarie avatar brianamarie commented on August 14, 2024

Apologies for my lack of depth in knowledge in Bash scripting - it sounds to me like @smokeybreeze, you're suggesting that we standardize to #!/bin/bash. Is that correct? If so, would that introduce any problems with the Windows (Git Bash) usability?

from training-manual.

smokeybreeze avatar smokeybreeze commented on August 14, 2024

We already have standardized on Bash based on the language constructs within the scripts.

To answer your question directly, it shouldn't create any issues with the Windows git bash since the Windows git bash actually uses the same GNU Bash that Mac OS X does, but the Windows git bash version is newer than the verstion of GNU Bash that comes on MAC OS X.

from training-manual.

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.