1
0
mirror of https://github.com/gilbN/theme.park.git synced 2024-11-20 18:12:31 +01:00

Find latest stable version if QBITTORRENT_VERSION is not set.

This commit is contained in:
GilbN 2024-04-14 17:06:34 +02:00
parent 90b00dd34d
commit 48f7cf8e13

View File

@ -23,6 +23,12 @@ if [ "${TP_DISABLE_THEME}" = true ]; then
exit 0 exit 0
fi fi
if [ -z ${QBITTORRENT_VERSION+x} ]; then \
echo 'QBITTORRENT_VERSION not set. Using the latest stable.' \
QBITTORRENT_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /temp \
&& awk '/^P:qbittorrent-nox$/,/V:/' /temp/APKINDEX | sed -n 2p | sed 's/^V://'); \
fi
# Display variables for troubleshooting # Display variables for troubleshooting
echo -e "Variables set:\\n\ echo -e "Variables set:\\n\
'APP_FILEPATH'=${APP_FILEPATH}\\n\ 'APP_FILEPATH'=${APP_FILEPATH}\\n\
@ -67,11 +73,9 @@ if [[ ! -d /themepark ]]; then
echo '| Downloading WebUI files from github |' echo '| Downloading WebUI files from github |'
echo '---------------------------------------' echo '---------------------------------------'
printf '\nDownloading qBittorrent to /temp\n' printf '\nDownloading qBittorrent to /temp\n'
if [[ -n ${QBITTORRENT_VERSION} ]]; then echo 'Downloading WebUI for version:' "${QBITTORRENT_VERSION}"
git clone --depth 1 -b release-${QBITTORRENT_VERSION} https://github.com/qbittorrent/qBittorrent /temp git clone --depth 1 -b release-${QBITTORRENT_VERSION} https://github.com/qbittorrent/qBittorrent /temp
else
git clone --depth 1 https://github.com/qbittorrent/qBittorrent /temp
fi
printf '\nDownload finished\n\n' printf '\nDownload finished\n\n'
cp -a /temp/src/webui/www /themepark cp -a /temp/src/webui/www /themepark
cp -a /temp/src/icons/. /themepark/public/icons cp -a /temp/src/icons/. /themepark/public/icons