my-ostree-OS/containers/general/bin/ffmpeg
Anders Rytter Hansen db2e555998 add cachyos general
2023-11-05 15:34:16 +01:00

23 lines
583 B
Bash
Executable file

#!/bin/sh
#if [ ! -f /run/.containerenv ] && [ ! -f /.dockerenv ]; then
command="podman run -it --rm -v \"$(pwd):$(pwd)\" --workdir=\"$(pwd)\" docker.io/linuxserver/ffmpeg "
for arg in "$@"; do
if echo "${arg}" | grep -Eq "'|\""; then
command="${command} \
$(echo "${arg}" | sed 's|\\|\\\\|g' |
sed 's| |\\ |g' |
sed 's|\$|\\\$|g' |
sed "s|'|\\\'|g" |
sed 's|"|\\\"|g')"
elif echo "${arg}" | grep -q "'"; then
command="${command} \"${arg}\""
else
command="${command} '${arg}'"
fi
done
eval ${command}
#else
# /usr/local/bin/ffmpeg "$@"
#fi