File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22RELEASES=(' AARCH64_SHA256' ' X64_SHA256' )
33
4- TAG_NAME =$( curl -fsL \
4+ CURL_RESULT =$( curl -fsL \
55 -H " Accept: application/vnd.github+json" \
66 -H " X-GitHub-Api-Version: 2022-11-28" \
7- https://api.github.com/repos/music-assistant/companion/releases | jq ' .[0].tag_name' )
7+ https://api.github.com/repos/music-assistant/companion/releases) || exit 1
8+ TAG_NAME=$( echo " ${CURL_RESULT} " | jq ' .[0].tag_name' )
89
9- MUSIC_COMPANION_VERSION=$( echo " ${TAG_NAME} " | cut -d" v" -f 2 | cut -d" \" " -f 1)
10+ VERSION_CUT=$( echo " ${TAG_NAME} " | cut -d" v" -f 2) || exit 1
11+ MUSIC_COMPANION_VERSION=$( echo " ${VERSION_CUT} " | cut -d" \" " -f 1) || exit 1
1012export MUSIC_COMPANION_VERSION
1113
1214for i in " ${RELEASES[@]} "
1315do
14- ARCH=$( echo " ${i} " | cut -f1 -d_ | tr ' [:upper:]' ' [:lower:]' )
16+ ARCH_PART=$( echo " ${i} " | cut -f1 -d_) || exit 1
17+ ARCH=$( echo " ${ARCH_PART} " | tr ' [:upper:]' ' [:lower:]' ) || exit 1
1518 URL=" https://github.com/music-assistant/companion/releases/download/v${MUSIC_COMPANION_VERSION} /Music.Assistant.Companion_${ARCH} .app.tar.gz"
1619 curl -sLO " ${URL} "
1720
18- SHA_FILE=$( shasum -a 256 " Music.Assistant.Companion_${ARCH} .app.tar.gz" | cut -d" " -f 1)
21+ SHA_RESULT=$( shasum -a 256 " Music.Assistant.Companion_${ARCH} .app.tar.gz" ) || exit 1
22+ SHA_FILE=$( echo " ${SHA_RESULT} " | cut -d" " -f 1) || exit 1
1923
2024 export " ${i} " =" ${SHA_FILE} "
2125done
You can’t perform that action at this time.
0 commit comments