Optimized jq

This commit is contained in:
DyonR 2020-08-16 15:22:05 +02:00
parent 9d232f3b95
commit 46f770fd6d

View File

@ -29,10 +29,10 @@ RUN apt update \
qtbase5-dev \
qttools5-dev \
libqt5svg5-dev \
&& QBITTORRENT_RELEASE=$(curl -sX GET "https://api.github.com/repos/qBittorrent/qBittorrent/tags" | jq '[.[]|select(.name)][0].name' | tr -d '"') \
&& LIBTORRENT_ASSETS=$(curl -sX GET "https://api.github.com/repos/arvidn/libtorrent/releases" | jq '[.[]|select(.assets_url)][0].assets_url' | tr -d '"') \
&& LIBTORRENT_DOWNLOAD_URL=$(curl -sX GET ${LIBTORRENT_ASSETS} | jq '[.[]|select(.browser_download_url)][0].browser_download_url' | tr -d '"') \
&& LIBTORRENT_NAME=$(curl -sX GET ${LIBTORRENT_ASSETS} | jq '[.[]|select(.name)][0].name' | tr -d '"') \
&& QBITTORRENT_RELEASE=$(curl -sX GET "https://api.github.com/repos/qBittorrent/qBittorrent/tags" | jq '.[0] .name' | tr -d '"') \
&& LIBTORRENT_ASSETS=$(curl -sX GET "https://api.github.com/repos/arvidn/libtorrent/releases" | jq '.[0] .assets_url' | tr -d '"') \
&& LIBTORRENT_DOWNLOAD_URL=$(curl -sX GET ${LIBTORRENT_ASSETS} | jq '.[0] .browser_download_url' | tr -d '"') \
&& LIBTORRENT_NAME=$(curl -sX GET ${LIBTORRENT_ASSETS} | jq '.[0] .name' | tr -d '"') \
&& curl -o /opt/qBittorrent-${QBITTORRENT_RELEASE}.tar.gz -L https://github.com/qbittorrent/qBittorrent/archive/${QBITTORRENT_RELEASE}.tar.gz \
&& curl -o /opt/${LIBTORRENT_NAME} -L ${LIBTORRENT_DOWNLOAD_URL} \
&& tar -xvzf /opt/qBittorrent-${QBITTORRENT_RELEASE}.tar.gz \