Update 90-customUI.sh

This commit is contained in:
Alexandre
2023-11-26 18:28:52 +01:00
committed by GitHub
parent 52ee74ab92
commit 1efbe23f2a

View File

@@ -25,11 +25,13 @@ if bashio::config.has_value 'customUI' && [ ! "$CUSTOMUI" = default ] && [ ! "$C
;;
"transmission-web-control")
mkdir -p /tmp/twctemp && \
TWCVERSION=$(curl -s "https://api.github.com/repos/transmission-web-control/transmission-web-control/releases/latest" | jq -r .tag_name)
curl -o /tmp/twc.tar.gz -L "https://github.com/transmission-web-control/transmission-web-control/archive/${TWCVERSION}.tar.gz"
tar xf /tmp/twc.tar.gz -C /tmp/twctemp --strip-components=1
mv /tmp/twctemp/src /transmission-web-control
curl -f -s -S -J -L -o /release.zip "$(curl -f -s https://api.github.com/repos/transmission-web-control/transmission-web-control/releases/latest | grep -o "http.*dist.zip" | head -1)" >/dev/null
### Install WebUI
mkdir -p /transmission-web-control
unzip -q /release.zip -d /transmission-web-control
mv /transmission-web-control/dist/* /transmission-web-control
rm /transmission-web-control/dist
rm /release.zip
# Enables the original UI button in transmission-web-control
ln -s /usr/share/transmission/web/style /transmission-web-control && \
ln -s /usr/share/transmission/web/images /transmission-web-control && \