bash-tpl
bash-tpl copied to clipboard
a conditional .INCLUDE throws error when file does not exist
% if [[ -f "$BUILD_SRC/Dockerfile" ]]; then
.INCLUDE "$BUILD_SRC/Dockerfile"
% fi
if the file "$BUILD_SRC/Dockerfile"
does not exist then the .INCLUDE statement is ignored BUT bash-tpl STILL seems to want to check that the .INCLUDE file exists thus throwing an error. This is unexpected.
File not found: '/data/Hacking/computing/docker/uci-docker-nextcloud/src/Dockerfile'
/dev/fd/63: line 142: syntax error near unexpected token `fi'
/dev/fd/63: line 142: `fi'
if "$BUILD_SRC/Dockerfile"
exists it all works as expected.