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

build.sh - grep for GNU bash version needs to be case-insensitive on line 269 #326

Closed
hmlio opened this issue Oct 8, 2019 · 1 comment
Closed

Comments

@hmlio
Copy link

hmlio commented Oct 8, 2019

  • Operating System Version: Ubuntu 18.04
  • Provider (VirtualBox/VMWare): VirtualBox
  • Vagrant Version:
  • Packer Version:
  • Building machines from scratch
  • The issue is reproducable

The shell script "build.sh" checks for the version of bash with the following (line 269):
BASH_MAJOR_VERSION=$(/bin/bash --version | grep 'GNU bash' | grep -o version... | cut -d ' ' -f 2 | cut -d '.' -f 1)

On Ubuntu 18.04 '/bin/bash --version' prints
GNU bash, Version 4.4.20(1)-release (x86_64-pc-linux-gnu)
with a capital "V", causing the grep not to find a match.

Modifying line 269 to be:
BASH_MAJOR_VERSION=$(/bin/bash --version | grep 'GNU bash' | grep -oi version... | cut -d ' ' -f 2 | cut -d '.' -f 1)
does the trick.

@clong clong closed this as completed in 3c34ded Oct 8, 2019
@clong
Copy link
Owner

clong commented Oct 8, 2019

Thanks for the report and the proposed fix!

Selora pushed a commit to Selora/DetectionLab that referenced this issue Dec 3, 2019
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