source doesn't block on macOS?
matiasgarciaisaia opened this issue · comments
I'm running the script locally in Bash (GNU bash, version 5.0.16(1)-release (x86_64-apple-darwin19.3.0)
) on macOS Catalina (10.15.4 (19E287)
). The script seems to try to call dockerSetup
before source
ing the script from the web:
$ ./build.sh
+ source /dev/fd/63
+ dockerSetup
++ curl -s https://raw.githubusercontent.com/manastech/ci-docker-builder/0dd477a550295f48d10892fb00d0c51da8cf60bf/build.sh
./build.sh: line 9: dockerSetup: command not found
$ (23) Failed writing body
The contents of my source.sh
are the ones suggested in the README.md
:
#!/bin/bash
set -eox pipefail
# This will load the script from this repository. Make sure to point to a specific commit so the build continues to work
# event if breaking changes are introduced in this repository
source <(curl -s https://raw.githubusercontent.com/manastech/ci-docker-builder/0dd477a550295f48d10892fb00d0c51da8cf60bf/build.sh)
# Prepare the build
dockerSetup
# Write a VERSION file for the footer
echo $VERSION > VERSION
# Build and push the Docker image
dockerBuildAndPush
It seems the following works on osx https://unix.stackexchange.com/a/16667/274661
source /dev/stdin <<< "$(curl -s https://...)"