adding powershell port
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
# grab-mods
|
# grab-mods
|
||||||
downloads the mods from [server-mods](https://code.jakeyoungdev.com/minecraft/server-mods) and moves them into the correct spot for Minecraft. This program will delete all other existing mods before moving them
|
downloads the mods from [server-mods](https://code.jakeyoungdev.com/minecraft/server-mods) and moves them into the correct spot for Minecraft. This program will delete all other existing mods before moving them
|
||||||
|
|
||||||
# requirements
|
## Powershell rewrite
|
||||||
|
I have started a rewrite in powershell to work more natively on windows machines
|
||||||
|
|
||||||
|
## requirements
|
||||||
you need git bash to run this, download it [here](https://github.com/git-for-windows/git/releases/download/v2.51.0.windows.2/Git-2.51.0.2-64-bit.exe) and run thru the setup there is no sign-up or anything required so don't give it info
|
you need git bash to run this, download it [here](https://github.com/git-for-windows/git/releases/download/v2.51.0.windows.2/Git-2.51.0.2-64-bit.exe) and run thru the setup there is no sign-up or anything required so don't give it info
|
||||||
30
mods.ps1
Normal file
30
mods.ps1
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
#this is the powershell conversion of the mod grab script to play more natively with windows
|
||||||
|
Write-Output "-----------------------------------------
|
||||||
|
Welcome to the mod helper! This program will overwrite
|
||||||
|
the mods on your pc with the newest seasons mods. This
|
||||||
|
program will delete all old mods, so move them if you want
|
||||||
|
to keep them.
|
||||||
|
-----------------------------------------"
|
||||||
|
|
||||||
|
Read-Host -Prompt "Press any key to continue" | Out-Null
|
||||||
|
|
||||||
|
New-Item -ItemType Directory mods
|
||||||
|
New-Item -ItemType Directory mods/files
|
||||||
|
#download file data
|
||||||
|
Invoke-WebRequest -Uri "https://code.jakeyoungdev.com/minecraft/server-mods/raw/branch/main/unzip_me.zip" -OutFile ./mods/unzip_me.zip
|
||||||
|
Expand-Archive -DestinationPath ./mods/files/ -Path ./mods/unzip_me.zip
|
||||||
|
|
||||||
|
#delete current mods
|
||||||
|
$UsrNameStr = $Env:UserName
|
||||||
|
Remove-Item "C:/Users/$UsrNameStr/AppData/Roaming/.minecraft/mods/*.jar"
|
||||||
|
|
||||||
|
#move new mods
|
||||||
|
Move-Item -Path "./mods/files/*.jar" -Destination "C:/Users/$UsrNameStr/AppData/Roaming/.minecraft/mods/"
|
||||||
|
|
||||||
|
#clean up our mess
|
||||||
|
Remove-Item -Recurse ./mods
|
||||||
|
|
||||||
|
Write-Output "
|
||||||
|
-----------------------------------------
|
||||||
|
The new mods should be installed on your pc
|
||||||
|
-----------------------------------------"
|
||||||
Reference in New Issue
Block a user