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

please do not use bash #300

Open
bastien-roucaries opened this issue Sep 27, 2023 · 2 comments
Open

please do not use bash #300

bastien-roucaries opened this issue Sep 27, 2023 · 2 comments

Comments

@bastien-roucaries
Copy link
Contributor

Hi,

A really low priority task, but you should try to only use dash (/bin/sh) construct.

It will allow to create smaller virtual machine on debian side

Bastien

@bastien-roucaries
Copy link
Contributor Author

bastien-roucaries commented Sep 27, 2023

checkbashism seems to support this a low effort goal

possible bashism in /tmp/grub-btrfs line 16 ($'...' should be "$(printf '...')"):
          GREEN=$'\033[0;32m'
possible bashism in /tmp/grub-btrfs line 17 ($'...' should be "$(printf '...')"):
          RED=$'\033[0;31m'
possible bashism in /tmp/grub-btrfs line 18 ($'...' should be "$(printf '...')"):
          CYAN=$'\033[;36m'
possible bashism in /tmp/grub-btrfs line 19 ($'...' should be "$(printf '...')"):
          RESET=$'\033[0m'
possible bashism in /tmp/grub-btrfs line 22 ($'...' should be "$(printf '...')"):
          GREEN=$'\033[0;0m'
possible bashism in /tmp/grub-btrfs line 23 ($'...' should be "$(printf '...')"):
          RED=$'\033[0;0m'
possible bashism in /tmp/grub-btrfs line 24 ($'...' should be "$(printf '...')"):
          CYAN=$'\033[;0m'
possible bashism in /tmp/grub-btrfs line 25 ($'...' should be "$(printf '...')"):
          RESET=$'\033[0m'
possible bashism in /tmp/grub-btrfs line 89 (${!name}):
                            logfile="${!OPTIND}"; OPTIND=$(( $OPTIND + 1 ))
possible bashism in /tmp/grub-btrfs line 111 (${foo:3[:1]}):
                            if [ "$OPTERR" = 1 ] && [ "${optspec:0:1}" != ":" ]; then
possible bashism in /tmp/grub-btrfs line 145 (${foo:3[:1]}):
                    if [ "$OPTERR" = 1 ] || [ "${optspec:0:1}" = ":" ]; then
possible bashism in /tmp/grub-btrfs line 169 (bash arrays, ${name[0|*|@]}):
          for snapdir in "${snapdirs[@]}"
possible bashism in /tmp/grub-btrfs line 315 (bash arrays, ${name[0|*|@]}):
    vlog "Snapshot directories: ${snapdirs[*]}"
possible bashism in /tmp/grub-btrfs line 330 (bash arrays, ${name[0|*|@]}):
        for snapdir in "${snapdirs[@]}"

@Schievel1
Copy link
Collaborator

Schievel1 commented Sep 30, 2023

I will look into this, but honestly I think the script is full of this and using sh is very inconvienient here.

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

No branches or pull requests

2 participants