go-toolbox/entrypoint.sh
Stanislav N. aka pztrn 48dda3455b
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
PATH definition and proper command line output.
2024-07-20 00:03:21 +05:00

24 lines
445 B
Bash

#!/bin/bash
# Entrypoint that handles both GitHub/Gitea actions things and direct commands execution.
CMD=$*
# Just ensure we have PATH defined properly.
PATH="${PATH}:/usr/bin/:/usr/sbin/:/bin/:/usr/local/bin/:/opt/bin/"
if [ "${CMD}" == "" ]; then
CMD="${INPUT_COMMAND}"
fi
if [ "${CMD}" == "" ]; then
echo "! No command to run!"
exit 1
fi
echo "----------"
echo "Launching command:"
echo "${CMD}"
echo "----------"
"${CMD}"