Files
ani-cli-web/docker-entrypoint.sh
T

20 lines
387 B
Bash

#!/bin/sh
set -eu
is_true() {
case "$(printf '%s' "${1:-}" | tr '[:upper:]' '[:lower:]')" in
1 | true | yes | on) return 0 ;;
*) return 1 ;;
esac
}
mkdir -p /downloads /app/.ani-cli-web
if is_true "${UPDATE_ON_START:-false}"; then
echo "Checking for ani-cli updates with sudo ani-cli --update"
sudo ani-cli --update
fi
cd /app
exec ./ani-cli-web "$@"