pr-size-labeler/entrypoint.sh

24 lines
453 B
Bash
Raw Normal View History

2020-03-03 23:31:53 +01:00
#!/usr/bin/env bash
set -euo pipefail
2020-02-27 07:46:56 +01:00
2020-03-03 23:31:53 +01:00
PR_SIZE_LABELER_HOME="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
2020-02-27 07:46:56 +01:00
2020-03-03 23:31:53 +01:00
if [ "$PR_SIZE_LABELER_HOME" == "/" ]; then
PR_SIZE_LABELER_HOME=""
2020-02-27 07:46:56 +01:00
fi
2020-03-03 23:31:53 +01:00
export PR_SIZE_LABELER_HOME
2020-02-27 07:46:56 +01:00
2020-03-04 00:00:24 +01:00
bash --version
2020-03-03 23:31:53 +01:00
source "$PR_SIZE_LABELER_HOME/src/main.sh"
2020-02-27 07:46:56 +01:00
for a in "${@}"; do
arg=$(echo "$a" | tr '\n' ' ' | xargs echo | sed "s/'//g"| sed "s///g")
sanitizedArgs+=("$arg")
done
main "${sanitizedArgs[@]}"
2020-02-27 17:42:21 +01:00
exit $?