Code Monkey home page Code Monkey logo

Comments (7)

osm0sis avatar osm0sis commented on May 14, 2024 1

Reopen since #48 (comment) is still a solid idea 👍

from opengapps.

mfonville avatar mfonville commented on May 14, 2024

I will have a look at it.
I already did shellcheck some parts of the script before, but for some things we currently have no 'cleaner' possibilities available (but that we know we won't have issues, because we know that we e.g. don't have spaces in our own foldernames).

from opengapps.

rapperskull avatar rapperskull commented on May 14, 2024

I'm also looking at this. @mfonville Do you think we can replace printf on line 112 and 113 of add_sourceapp.sh with echo?

from opengapps.

mfonville avatar mfonville commented on May 14, 2024

I used there printf because it has no line-endings, but we could also use echo -n I guess.
You'll have to test carefully with the 'cut' though, if nothing breaks.

from opengapps.

 avatar commented on May 14, 2024

echo flags are not portable. All scripts specify the #!/bin/sh shebang, which indicates that the scripts work with /bin/sh, but echo flags are a non-standard feature.

printf is portable and should always be used instead of echo with flags. Rather than replace printf with echo to silence SC2059 warnings, follow the ShellCheck warning and use format specifiers. It is worth noting that there are exceptions and sometimes you want to interpret data as a format string, as shown in the ShellCheck warning: hexToAscii() { printf "\x$1"; } hexToAscii 21

from opengapps.

mfonville avatar mfonville commented on May 14, 2024

I also want to integrate shellcheck checking of the update-binary output into the Github status API https://developer.github.com/v3/repos/statuses/ to give feedback if a commit would break the shellscript completely.

from opengapps.

 avatar commented on May 14, 2024

Here's a new log against 9c728b1 in case developers are interested:
https://gist.github.com/anonymous/a73d099195a0b8215e8504151db5071d

shellcheck00.log was generated with the noisiest warnings disabled
SC2016,SC2034,SC2045,SC2153,SC2154,SC2164
shellcheck01.log was generated with all warnings enabled (default)

from opengapps.

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.