Only chmod u+x if not already executable, in case user is not owner but file is already g/o+x

pull/886/head
Dan Lester 2020-05-01 13:35:17 +01:00
rodzic 057c837a75
commit 146db2f4f0
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -3,7 +3,9 @@
# we use a login shell to get a fully configured shell environment # we use a login shell to get a fully configured shell environment
# (e.g. sourcing /etc/profile.d, ~/.bashrc, and friends) # (e.g. sourcing /etc/profile.d, ~/.bashrc, and friends)
if [[ ! -z "${R2D_ENTRYPOINT:-}" ]]; then if [[ ! -z "${R2D_ENTRYPOINT:-}" ]]; then
chmod u+x "$R2D_ENTRYPOINT" if [[ ! -x "$R2D_ENTRYPOINT" ]]; then
chmod u+x "$R2D_ENTRYPOINT"
fi
exec "$R2D_ENTRYPOINT" "$@" exec "$R2D_ENTRYPOINT" "$@"
else else
exec "$@" exec "$@"