From 10a19a4ea54399287058379ef064e09f65825c7f Mon Sep 17 00:00:00 2001 From: shopeonarope Date: Sun, 19 Sep 2021 12:09:45 -0600 Subject: [PATCH] Handle input args containing spaces (#13) --- root/ffmpegwrapper.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/root/ffmpegwrapper.sh b/root/ffmpegwrapper.sh index f58f969..cc32b20 100755 --- a/root/ffmpegwrapper.sh +++ b/root/ffmpegwrapper.sh @@ -1,6 +1,6 @@ #! /bin/bash -FULL_ARGS=$@ +FULL_ARGS=( "$@" ) set_uidgid () { # setup abc based on file perms @@ -13,12 +13,12 @@ set_uidgid () { run_ffmpeg () { # we do not have input file or it does not exist on disk just run as root if [ -z ${INPUT_FILE+x} ] || [ ! -f "${INPUT_FILE}" ]; then - /usr/local/bin/ffmpeg ${FULL_ARGS} + /usr/local/bin/ffmpeg "${FULL_ARGS[@]}" # we found the input file run as abc else set_uidgid s6-setuidgid abc \ - /usr/local/bin/ffmpeg ${FULL_ARGS} + /usr/local/bin/ffmpeg "${FULL_ARGS[@]}" fi exit 0 }