Skip to content

Commit

Permalink
vuetorrent curl github redirect (#535)
Browse files Browse the repository at this point in the history
* 1.13.8 (#496)

* Bad interpreter error associated with the NPM release of 2.9.21 (#486)

* Fix Pi-Hole network details table colors (#489)

* Grafana 9.5.1 element support (#492)

Adding support for only a few elements in latest version of Grafana

* Added uptime kuma card css (#494)

* Use hashlib instead of git shas

* Fix Latest manifest if logic

---------

Co-authored-by: goodbyepavlyi 3 <[email protected]>
Co-authored-by: Samuel Bartík <[email protected]>
Co-authored-by: rg9400 <[email protected]>
Co-authored-by: Henry Whitaker <[email protected]>

* Set line feed in fetch script

* 1.15.1 (#534)

* qbittorrent: 💄Fixes for #526

* Unraid: Fix login script github.io URL
Unraid: Fix the navbar scroll overflow.

* Move from subversion to git for pulling the qbittorrent webui (#530)

* Move from subversion to git for pulling the qbittorrent webui

* slight verbage changes

---------

Co-authored-by: Blake <[email protected]>

* vuetorrent curl github redirect

The curl of the latest vuetorrent repo returns a 301 redirect code and location https://api.github.com/repositories/181508472/releases/latest resulting in a `Cannot iterate over null (null)` when jq filters assets against the output from the original request.

---------

Co-authored-by: GilbN <[email protected]>
Co-authored-by: goodbyepavlyi 3 <[email protected]>
Co-authored-by: Samuel Bartík <[email protected]>
Co-authored-by: rg9400 <[email protected]>
Co-authored-by: Henry Whitaker <[email protected]>
Co-authored-by: Blake <[email protected]>
  • Loading branch information
7 people authored Jan 25, 2024
1 parent 17fc9c0 commit cdbce0a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docker-mods/vuetorrent/root/etc/cont-init.d/98-themepark
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ if [[ -z ${TP_THEME} ]]; then
fi
RELEASE_FILEPATH='/vuetorrent/release.json'
NEEDS_UPDATE=false
CURRENT_RELEASE=$(curl -s https://api.github.com/repos/WDaan/VueTorrent/releases/latest | jq -r ".assets[]")
CURRENT_RELEASE=$(curl -Ls https://api.github.com/repos/WDaan/VueTorrent/releases/latest | jq -r ".assets[]")

# ===============================================
install_deps() {
Expand Down Expand Up @@ -146,4 +146,4 @@ if ! grep -q "${TP_DOMAIN}/css/base" "${INDEX_FILEPATH}"; then
sed -i "s/<\/body>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/base\/vuetorrent\/vuetorrent-base.css'><\/body> /g" "${INDEX_FILEPATH}"
sed -i "s/<\/body>/<link rel='stylesheet' href='${TP_SCHEME}:\/\/${TP_DOMAIN}\/css\/${THEME_TYPE}\/${TP_THEME}.css'><\/body> /g" "${INDEX_FILEPATH}"
printf 'Stylesheet set to %s on public index.html\n' "${TP_THEME}"
fi
fi
14 changes: 10 additions & 4 deletions fetch.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
#!/usr/bin/env bash
# Downloads all docker mod scripts

# Downloads all docker mod scripts
MODS=$(curl https://theme-park.dev/themes.json | jq -r '.["docker-mods"]')
if [[ "$0" == "bash" ]]; then
DIR="/tmp/theme-park-mods"
else
DIR="$0"
DIR="$0"
fi
mkdir -p "$DIR"
printf "\nSaving mods into $DIR\n\n"
jq -r 'to_entries | map(.key + "|" + (.value | tostring)) | .[]' <<< "$MODS" | \
while IFS='|' read key value; do
curl "$value" --create-dirs --output "$DIR/98-themepark-$key" --silent
download_file="$DIR/98-themepark-$key"
curl "$value" --create-dirs --output "$download_file" --silent
echo "Fetched $key script"

# Convert line endings from CRLF to LF manually
if [[ "$(tail -c2 "$download_file")" == $'\r\n' ]]; then
perl -pi -e 's/\r\n/\n/' "$download_file"
fi
done
chmod -R +x $DIR
chmod -R +x "$DIR"

0 comments on commit cdbce0a

Please sign in to comment.