diff --git a/.github/scripts/replace-asset.sh b/.github/scripts/replace-asset.sh index 720ee2fe3..c86f828bb 100755 --- a/.github/scripts/replace-asset.sh +++ b/.github/scripts/replace-asset.sh @@ -1,6 +1,7 @@ #!/bin/sh -eux -# If first parameter is GITHUB_TOKEN=, use as an env var GITHUB_TOKEN (used by the scripts below) +set +e # pattern matching may fail +# If first parameter 2 parameters is GITHUB_REPOSOTIRY and GITHUB_TOKEN, those willbe used as an env var (used by the scripts below) REPOSITORY=$(expr $1 : "GITHUB_REPOSITORY=\(.*\)") if [ $? -eq 0 ]; then export GITHUB_REPOSITORY=$REPOSITORY @@ -11,6 +12,7 @@ if [ $? -eq 0 ]; then export GITHUB_TOKEN=$TOKEN shift fi +set -e DIR=$(dirname $0)