mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-19 23:09:13 +00:00
.github/scripts/replace-asset.sh: fixed a fail
Fixed premature end when GITHUB_REPOSITORY/GITHUB_TOKEN were not given.
This commit is contained in:
4
.github/scripts/replace-asset.sh
vendored
4
.github/scripts/replace-asset.sh
vendored
@@ -1,6 +1,7 @@
|
||||
#!/bin/sh -eux
|
||||
|
||||
# If first parameter is GITHUB_TOKEN=<tok>, use <tok> 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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user