Compare commits

...

14 Commits

Author SHA1 Message Date
7fee8de771 Merge pull request 'both scripts working' (#9) from untested into main
Reviewed-on: https://git.adolin.xyz/saru/lobotomy-mod-pack/pulls/9
2024-10-27 16:32:26 -05:00
64acd6cbfa update mods, add beanbags 2024-10-27 16:29:35 -05:00
2497cd1b8a various changes 2024-10-27 16:00:26 -05:00
d23e4312cb remove mods.zip 2024-10-27 15:52:23 -05:00
fbc7680fc7 fix cURL download snippet 2024-10-27 15:51:54 -05:00
0889cc265e fix broken directory 2024-10-27 15:30:53 -05:00
6de71b121c upload zip archive, code comments, fix linux-inst. 2024-10-27 15:13:15 -05:00
2968f3fd0b resync 2024-10-27 14:56:19 -05:00
aefc4eae06 Merge branch 'untested' of https://git.adolin.xyz/saru/lobotomy-mod-pack into untested 2024-10-27 14:54:34 -05:00
b361ff5a87 add ascii art
false alarm!!! found an ascii generator which will generate art with normal characters supported by cmd.exe
2024-10-27 14:54:15 -05:00
2245d8798b remove ascii
cmd.exe thinks it's ms-dos and doesnt even support UTF-8, just it's own set of 256 characters from the IBM-PC workstation era in like the fucking 80's, so we're not allowed to have fun.
2024-10-27 14:31:03 -05:00
c3471acec0 remove ascii
cmd.exe thinks it's ms-dos and doesnt even support UTF-8, just it's own set of 256 characters from the IBM-PC workstation era in like the fucking 80's
2024-10-27 14:30:23 -05:00
7b5369bf43 change ascii art
to be tested
2024-10-27 13:59:59 -05:00
bbd2ed6fb0 fix fabric installer downloading to user downloads folder 2024-10-27 13:48:07 -05:00
4 changed files with 70 additions and 49 deletions

View File

@ -1,22 +1,24 @@
#!/bin/bash #!/bin/bash
# shebang!
#-H "Authorization: token c3971c2711faee3c824db29a16d4d547472cb0bf"
# ^^ public auth token, put here so i dont lose it pasting cURL snippets
echo "################" echo "################"
echo SCRIPT STARTING echo SCRIPT STARTING
echo "################" echo "################"
#template # template
#printf "${process0}"\\r; # printf "${process0}"\\r;
#zip; # zip;
#printf "${process0} \e[32m[DONE!]\e[0m" # printf "${process0} \e[32m[DONE!]\e[0m"
moddir="~/.minecraft" moddir="/home/$USER/.minecraft"
cd ${moddir} cd ${moddir}
process0="Backing up existing mod folder..." process0="Backing up existing mod folder..."
printf "${process0}"\\r; printf "${process0}"\\r;
zip -r -q ./mods/.mod-folder-backup.zip mods && printf "${process0} \e[32m[DONE!]\e[0m" sudo zip -r -q ./mods/.mod-folder-backup.zip mods && printf "${process0} \e[32m[DONE!]\e[0m"
#i didnt even know `zip` as a standalone command existed. #i didnt even know `zip` as a standalone command existed.
#this needs to be a tar.gz archive. #this needs to be a tar.gz archive.
echo echo
@ -24,30 +26,24 @@ sleep 1
process1="Removing old mods..." process1="Removing old mods..."
printf "${process1}"\\r; 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 echo
sleep 1 sleep 1
moddir="/home/$USER/.minecraft/mods" moddir="/home/$USER/.minecraft/mods"
cd ${moddir} cd ${moddir}
process2="Downloading mod package..." process2="Downloading mod package..."
printf "${process2}"\\r; printf "${process2}"\\r;
sudo curl http://192.168.7.208:420/api/shares/YxMjU3N/files/e641be0e-bccd-4f3d-8a86-7dbbb8f88263 -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 c3971c2711faee3c824db29a16d4d547472cb0bf" -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"
#what the fuck? # fixed!
#how does this work?
#fix this.
echo echo
sleep 1 sleep 1
process3="Extracting package..." process3="Extracting package..."
printf "${process3}"\\r; printf "${process3}"\\r;
unzip -q mod-archive.zip; sudo tar -xvzf mods.tar.gz;
# replaced?
printf "${process3} \e[32m[DONE!]\e[0m" printf "${process3} \e[32m[DONE!]\e[0m"
echo echo
sleep 1 sleep 1

View File

@ -1,72 +1,97 @@
@echo off @echo off
cd /D "%~dp0"
set mcroot="%USERPROFILE%\AppData\Roaming\.minecraft" set mcroot="%USERPROFILE%\AppData\Roaming\.minecraft"
set modfolder="%USERPROFILE%\AppData\Roaming\.minecraft\mods" set modfolder="%USERPROFILE%\AppData\Roaming\.minecraft\mods"
set cusdate=%DATE:~4,2%-%DATE:~7,2%-%DATE:~10,4% set cusdate=%DATE:~4,2%-%DATE:~7,2%-%DATE:~10,4%
:: environment variables
echo "################" echo "################"
echo SCRIPT STARTING echo SCRIPT STARTING
echo "################" echo "################"
echo. echo.
@timeout /t 1 >nul 2>&1 @timeout /t 1 >nul 2>&1
:: been using this timeout line for 4 years now and for the life of me i still dont know why it works
:: its hitting me that i should probably pick something better
echo Downloading latest fabric installer... echo Downloading latest fabric installer...
cd %mcroot%
curl -k "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.1/fabric-installer-1.0.1.exe" -o fabricinstaller.exe curl -k "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.1/fabric-installer-1.0.1.exe" -o fabricinstaller.exe
ECHO ###### !!!!! ###### ECHO ###### !!!!! ######
echo MAKE SURE YOU PICK THE CURRENT SERVER MINECRAFT VERSION, 1.20.1 echo MAKE SURE YOU PICK THE CURRENT SERVER MINECRAFT VERSION, 1.20.1
echo You only need to change the minecraft version, don't worry about the launcher version option. echo You only need to change the minecraft version, don't worry about the launcher version option.
:: no one is gonna read this and im gonna get some dumbass questions.
ECHO ###### !!!!! ###### ECHO ###### !!!!! ######
start /WAIT "%mcroot%" fabricinstaller.exe start /WAIT "%mcroot%" fabricinstaller.exe
:: `/WAIT` serves to stop the bat script from moving on until the windows closes. only works for some programs, luckily the fabric installer is one of them.
:: maybe needs a way to check if the installer actually needs to be updated. runs every time right now. annoying for beta testers.
echo Updating... echo Updating...
cd /d %mcroot% cd /d %mcroot%
curl -k "https://git.adolin.xyz/saru/lobotomy-mod-pack/raw/branch/main/mods.tar.gz" -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 c3971c2711faee3c824db29a16d4d547472cb0bf" -o mods.tar.gz curl -k "https://git.adolin.xyz/saru/lobotomy-mod-pack/raw/branch/main/mods.tar.gz" -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 c3971c2711faee3c824db29a16d4d547472cb0bf" -o mods.tar.gz
:: GOD i fucking hate this line so much why does it need allat
echo Compressing and backing up existing mods... echo Compressing and backing up existing mods...
tar -czf %mcroot%/mods-backup-%cusdate%.tar.gz %modfolder% tar -czf %mcroot%/mods-backup-%cusdate%.tar.gz %modfolder%
@timeout /t 2 >nul 2>&1 @timeout /t 2 >nul 2>&1
:: tar on windows is some bullshit
:: like why the fuck is it easier to extract a tarball than a fucking zip file
:: didnt microcock literally invent and standardize that file format themselves?
:: why is it fucking impossible to automate zipping and unzipping files on WINDOWS??
:: ITS EASIER ON LINUX.
echo Deleting existing mods... echo Deleting existing mods...
rmdir /S /Q mods rmdir /S /Q mods
mkdir mods mkdir mods
:: sloppy
@timeout /t 2 >nul 2>&1 @timeout /t 2 >nul 2>&1
tar -xvzf %mcroot%/mods.tar.gz -C %modfolder% tar -xvzf %mcroot%/mods.tar.gz -C %modfolder%
:::
::: ⠀⣿⡪⡪⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ::: :+++++=
::: ⢸⡯⡯⡪⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ::: -++++++.
::: ⢸⡯⡇⠪⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ::: :++++++. .
::: ⢸⡯⡣⡨⣻⡀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠚⠁⠈⢳⡀⠀⠀⠀⠀⠀⣀⠴⠖⢂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ::: .++++++. -=. -: .::
::: ⠈⣿⡪⡺⣺⡇⠀⠀⠀⠀⠀⠀⠀⣸⠁⠀⠀⠀⣀⢳⠀⠀⠀⢀⠞⠁⠀⠀⠈⢧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ::: =+++++. :=. =- .--:. -
::: ⠀⢸⣮⣪⣨⣷⠀⠀⠀⠀⠀⠀⢀⡇⠀⠀⠀⠸⡏⠻⣇⠀⣰⠋⠀⠀⠀⠀⠀⢸⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ::: =+++++. .+ =: -=. :=
::: ⠀⢸⣯⣪⣹⡇⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⣀⢤⠇⠀⠈⠀⠗⠀⠀⠀⠀⠀⠀⠈⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ::: =+++++. +. :.=* .=: =:
::: ⠀⠈⣿⣿⣿⣇⡀⠀⠀⠀⠀⠀⠸⡆⠀⠀⠉⠓⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ::: =++++= .+ +. -- :+ .=
::: ⠀⢀⣿⠃⢸⠀⠉⠑⠲⢤⣀⠀⠀⢳⡶⠆⣠⢞⣶⠂⠀⣴⢲⣶⡄⠠⠤⠤⢤⡸⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ::: .+++++= .= ..=: :. =
::: ⠀⠈⣇⠀⡘⠀⠀⠀⠀⠀⠈⠉⠒⠾⢧⣴⣟⡺⠿⣠⡄⠁⠸⣿⡿⢠⠀⢀⡞⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ::: .++=++- .= .+- =
::: ⠀⠀⠘⠶⠇⠤⠤⠤⠤⣤⣤⣤⣀⣀⣤⣄⣈⣉⣒⡶⠤⠆⠀⠸⠉⠉⠰⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ::: ==++*=::.. * +
::: ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠙⢢⡄⠀⠀⠀⠀⠀⠀⢠⡄⠀⣽⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ::: =*#-+- .:---:. :=-- .-=%. --=#- ..::.--
::: ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⣴⠉⠀⠀⠀⠀⠀⠀⠀⠀⠙⠦⢠⡴⠶⠲⢄⡀⠀⠀⠀⠀⠀⠀⠀⠀ ::: :#=-*- .::--:.*: .+ #@. - *@@- .. -#:
::: ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢡⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⢢⡀⠀⠙⢦⡀⠀⠀⠀⢀⣠⠄ ::: ++:*. .:--==:--:: .%%-.. :=.
::: ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⢧⠀⠀⠀⠀⠀⠀⠀⠀⠓⢦⣀⠀⠀⠀⠀⢹⠀⠀⠀⠉⠒⠒⠒⢻⡟⠀ ::: =++.:...::::::..... :---+-:. .:.: --
::: ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⣏⣄⠀⠀⠀⠀⠀⠀⠀⠀⡼⠉⠁⠀⠀⢀⡞⠂⠀⠀⠀⠀⠀⠀⡸⠁⠀ ::: *=..:::.. .=.
::: ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡀⠀⠀⠀⠀⠀⠀⢸⠁⠀⠀⠀⠀⣞⠀⠀⠀⠀⠀⠀⠀⡰⠃⠀⠀ ::: :-. .=:::
::: ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣧⠀⠀⠀⠀⢀⠀⠸⡄⠀⠀⠀⠀⢨⢇⠀⠀⠀⣀⡠⠞⠁⠀⠀⠀ ::: ..:=. :-..-:---:
::: ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡼⠇⠀⠀⠀⠸⣆⠀⠈⠲⠤⠤⡴⠋⠈⠉⠉⠉⠁⠀⠀⠀⠀⠀⠀ ::: ==:- .=-: :=-
::: ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⣁⠀⠀⠀⠀⡀⣀⡼⢆⠀⠀⠀⠀⢱⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ::: .= =- :--. .--
::: ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠉⠉⠉⠁⠀⠀⠸⡄⠀⠀⠀⠹⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ::: -- :-:. -= .::::-:=.
::: ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠳⣄⣀⠀⣸⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ::: :- =- :+ .+
::: ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ::: --- -: .+ +.
::: ::: := -= .+ =:
::: +. -: =: :=.
::: -. .=: --.....::-:
::: .=- .= :-:----- .::::.
::: .-: .= ..+:
::: -=......:.:-:+ :=
::: .::--::... := -
::: =: =:
::: --::.--
::: ....
::someone's gonna think im a furry or a femboy or some shit because of this.
for /f "delims=: tokens=*" %%A in ('findstr /b ::: "%~f0"') do @echo(%%A) for /f "delims=: tokens=*" %%A in ('findstr /b ::: "%~f0"') do @echo(%%A)
echo Sigma! :: this line prints every line that starts with ':::' non-destructively - pretty cool.
echo All done. C: :: easier than escaping every single symbol that could potentially be interpreted as a functional character
echo .
echo Sigma! All done. C:
echo This window will close in ten seconds. echo This window will close in ten seconds.
:: FBI secret agent self-destructing message headass.
@timeout /t 10 >nul 2>&1 @timeout /t 10 >nul 2>&1
exit exit

Binary file not shown.

Binary file not shown.