And this tool is just a quick&dirty hack not ready to be shared publicly. He forgot to mention in the readme that you have to adjust one variable inside the script before it can do what it's made for: Copying the contents of a rootfs folder into the disk image.
He also forgot to write that the script has to be called as root otherwise strange things will happen (since he doesn't use error handling at all. His code quality is horrible)
You do a check like this in such situations:
if [[ `id -u` -ne 0 ]] ; then ( echo "You must call this script as root" >&2 ; exit 1 ) ; fi
Then he uses "ROOTFSPATH=~/BB" and does not check whether this directory exists but relies on it later in the script. Using '~' is crap when the script should be called as root since when you use 'sudo -s' to become root it points to the user's homedir but when you use 'sudo su -' instead (recommended way) the variable points to root's homedir and that's a totally different location. The script relies on a variable that might differ based on the way the user in question normally tries to get root.
Then you do not rely on a command being executed correctly but instead check always the exit code afterwards and exit when the exit code is not 0. Especially when you use the output of this command later TO OVERWRITE random parts of devices connected to the host. If you run his script on your normal linux workhorse things might get really wrong.
But this is stuff that can be fixed easily. Simply by adopting good coding style (yes, that's also possible with shell scripts). And I already pointed to locations that can be used to learn from. His scripts are really dangerous at the moment. And noone should use them unless he fixed the most severe mistakes.