fix cURL download snippet

This commit is contained in:
Obie Hinojosa 2024-10-27 15:51:54 -05:00
parent 8a9372be29
commit 5e6452f99e

View File

@ -1,6 +1,9 @@
#!/bin/bash
# shebang!
#-H "Authorization: token ***REMOVED***"
# ^^ public auth token, put here so i dont lose it pasting cURL snippets
echo "################"
echo SCRIPT STARTING
echo "################"
@ -23,7 +26,7 @@ sleep 1
process1="Removing old mods..."
printf "${process1}"\\r;
sudo rm /home/$USER/.minecraft/mods/* && printf "${process1} \e[32m[DONE!]\e[0m"
sudo rm -r /home/$USER/.minecraft/mods && sudo mkdir /home/$USER/.minecraft/mods && printf "${process1} \e[32m[DONE!]\e[0m"
echo
sleep 1
@ -32,15 +35,15 @@ cd ${moddir}
process2="Downloading mod package..."
printf "${process2}"\\r;
sudo curl -k "https://git.adolin.xyz/saru/lobotomy-mod-pack/raw/branch/main/mods.zip" -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/png,image/svg+xml,*/*;q=0.8" -H "Accept-Language: en-US,en;q=0.5" -H "Accept-Encoding: gzip, deflate, br, zstd" -H "DNT: 1" -H "Sec-GPC: 1" -H "Alt-Used: git.adolin.xyz" -H "Connection: keep-alive" -H "Upgrade-Insecure-Requests: 1" -H "Sec-Fetch-Dest: document" -H "Sec-Fetch-Mode: navigate" -H "Sec-Fetch-Site: same-origin" -H "Sec-Fetch-User: ?1" -H "Priority: u=0, i" -H "TE: trailers" -H "Authorization: token ***REMOVED***" -o mods.tar.gz -O -J -L -s && printf "${process2} \e[32m[DONE!]\e[0m"
sudo curl 'https://git.adolin.xyz/saru/lobotomy-mod-pack/raw/branch/main/mods.tar.gz' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/png,image/svg+xml,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' -H 'Accept-Encoding: gzip, deflate, br, zstd' -H 'Prefer: safe' -H 'Alt-Used: git.adolin.xyz' -H 'Connection: keep-alive' -H "Authorization: token ***REMOVED***" -H 'Upgrade-Insecure-Requests: 1' -H 'Sec-Fetch-Dest: document' -H 'Sec-Fetch-Mode: navigate' -H 'Sec-Fetch-Site: same-origin' -H 'Sec-Fetch-User: ?1' -H 'Priority: u=0, i' -H 'TE: trailers' -o mods.tar.gz && printf "${process2} \e[32m[DONE!]\e[0m"
# fixed!
echo
sleep 1
process3="Extracting package..."
printf "${process3}"\\r;
unzip -q mod-archive.zip;
# HATE. that this still uses a zip archive. need to replace with a tarball.
tar -xvzf mods.tar.gz;
# Hreplaced?
printf "${process3} \e[32m[DONE!]\e[0m"
echo
sleep 1