[Buildroot] [PATCH] support/scripts: fix shebang with bash

Peter Korsgaard peter at korsgaard.com
Fri Jun 9 08:50:33 UTC 2017


>>>>> "François" == François Perrad <francois.perrad at gadz.org> writes:

Hi,

 >> And /bin/sh is a symlink to /run/current-system/sw/bin/bash? Otherwise I
 >> don't understand how the logic in Makefile and
 >> support/dependencies/dependencies.sh could work?
 >> 

 > /bin/sh is a symlink to
 > /nix/store/bxr5lwdhhgfh1p28mh3w7kyc0spk7niz-bash-4.4-p5/bin/sh
 > /run/current-system/sw/bin/bash is a symlink to
 > /nix/store/bxr5lwdhhgfh1p28mh3w7kyc0spk7niz-bash-4.4-p5/bin/bash

Ok, and than ../bin/sh is presumably a symlink to ../bin/bash?


 >> What about packages? Are there no package build systems that hardcodes
 >> /bin/bash?
 >> 

 > No.
 > Packages needed by Buildroot could be declared like this :
 > https://github.com/fperrad/misc/blob/master/nix/buildroot.nix

What I mean is that seeing scripts with the #!/bin/bash shebang is quite
common, so I wouldn't be surprised if some of the upstream build systems
used by some of the packages we have in buildroot use that.

For one, some of our board specific scripts use it:

board/stmicroelectronics/stm32f429-disco/flash.sh:#!/bin/bash
board/stmicroelectronics/stm32f469-disco/flash.sh:#!/bin/bash
board/technologic/ts4800/post-image.sh:#!/bin/bash
board/technologic/ts4900/post-image.sh:#!/bin/bash

-- 
Bye, Peter Korsgaard


More information about the buildroot mailing list