The build script for the backend relied on some bash specifics.
Since bash is not available in alpine based node docker images,
building failed. This commit replaces bash functions with the
native POSIX equivalents.
Signed-off-by: Erik Michelson <github@erik.michelson.eu>