12 lines
486 B
Bash
Executable file
12 lines
486 B
Bash
Executable file
#!/bin/bash
|
|
|
|
if [[ -n "$ZEITDL_UID" || -n "$ZEITDL_GID" ]]; then
|
|
echo "Running zeit-dl with --quiet to get output path for chown/chgrp..."
|
|
out=$(python ./zeit-dl "$ZEITDL_USER" "$ZEITDL_PASSWORD" ${ZEITDL_OPTIONS:=-o /data} --quiet)
|
|
if [[ -n "$out" ]]; then
|
|
[[ -n "$ZEITDL_UID" ]] && chown $ZEITDL_UID "$out"
|
|
[[ -n "$ZEITDL_GID" ]] && chgrp $ZEITDL_GID "$out"
|
|
fi
|
|
else
|
|
python ./zeit-dl "$ZEITDL_USER" "$ZEITDL_PASSWORD" ${ZEITDL_OPTIONS:=-o /data}
|
|
fi
|