mirror of
https://github.com/fosrl/newt.git
synced 2026-02-08 05:56:40 +00:00
Allow use of env vars
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Sample from https://github.com/traefik/traefik-library-image/blob/5070edb25b03cca6802d75d5037576c840f73fdd/v3.1/alpine/entrypoint.sh
|
||||
|
||||
set -e
|
||||
|
||||
# first arg is `-f` or `--some-option`
|
||||
@@ -9,13 +7,4 @@ if [ "${1#-}" != "$1" ]; then
|
||||
set -- newt "$@"
|
||||
fi
|
||||
|
||||
# if our command is a valid newt subcommand, let's invoke it through newt instead
|
||||
# (this allows for "docker run newt version", etc)
|
||||
if newt "$1" --help >/dev/null 2>&1
|
||||
then
|
||||
set -- newt "$@"
|
||||
else
|
||||
echo "= '$1' is not a newt command: assuming shell execution." 1>&2
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user