There was a bashism in the script. This fixes the script so that it doesn't actually require bash, and can be run with any POSIX shell as its shebang suggests. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Based on work by Alexey Loukianov <lx2@lexa2.ru> and others. Signed-off-by: David Woodhouse <dwmw2@infradead.org>