Simplify mod handling (#365)

This commit is contained in:
Greelan 2023-05-16 21:36:27 +10:00 committed by GitHub
parent f960e3a823
commit ac41157f3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 18 additions and 22 deletions

View File

@ -22,6 +22,7 @@ Meta.NoCommercialUsage=False
App.DisplayName=Arma 3
App.RootDir=./arma3/
App.BaseDirectory=./arma3/233780/
App.SteamWorkshopDownloadLocation={{$FullBaseDir}}
App.ExecutableWin=233780\ArmA3Server_x64.exe
App.ExecutableLinux=233780/arma3server_x64
App.WorkingDir=233780

4
arma3convertmods.sh Normal file
View File

@ -0,0 +1,4 @@
#!/bin/bash
find ./arma3/233780/steamapps/workshop/content/107410/ -depth -name "*[A-Z]*" -print0 |\
xargs -0 -I {} bash -c "mv \"{}\" \"\`echo \"{}\" | sed 's,\(.*\)\/\(.*\),\1\/\L\2,'\`\""
exit 0

View File

@ -36,23 +36,16 @@
"UpdateStageName":"Modscript Download",
"UpdateSourcePlatform":"Linux",
"UpdateSource":"FetchURL",
"UpdateSourceData":"https://github.com/CubeCoders/AMPTemplates/raw/main/arma3modscript.sh",
"UpdateSourceArgs":"modscript.sh",
"UpdateSourceData":"https://github.com/CubeCoders/AMPTemplates/raw/main/arma3convertmods.sh",
"UpdateSourceArgs":"convertmods.sh",
"UpdateSourceTarget":"{{$FullInstanceDir}}",
"OverwriteExistingFiles":true
},
{
"UpdateStageName":"Convert and Symlink Mods",
"UpdateStageName":"Convert Mods",
"UpdateSourcePlatform":"Linux",
"UpdateSource":"Executable",
"UpdateSourceData":"/bin/bash",
"UpdateSourceArgs":"./modscript.sh"
},
{
"UpdateStageName":"Link Mods",
"UpdateSourcePlatform":"Windows",
"UpdateSource":"Executable",
"UpdateSourceData":"cmd.exe",
"UpdateSourceArgs":"/C cd .\\arma3\\233780 && for /D %G in (.\\steamapps\\workshop\\content\\107410\\*) do mklink /J %~nxG %G"
"UpdateSourceArgs":"./convertmods.sh"
}
]

View File

@ -22,6 +22,7 @@ Meta.NoCommercialUsage=False
App.DisplayName=DayZ (Experimental)
App.RootDir=./dayz/
App.BaseDirectory=./dayz/1042420/
App.SteamWorkshopDownloadLocation={{$FullBaseDir}}
App.ExecutableWin=1042420\DayZServer_x64.exe
App.ExecutableLinux=1042420/DayZServer
App.WorkingDir=1042420

View File

@ -0,0 +1,4 @@
#!/bin/bash
find ./dayz/1042420/steamapps/workshop/content/221100/ -depth -name "*[A-Z]*" -print0 |\
xargs -0 -I {} bash -c "mv \"{}\" \"\`echo \"{}\" | sed 's,\(.*\)\/\(.*\),\1\/\L\2,'\`\""
exit 0

View File

@ -20,23 +20,16 @@
"UpdateStageName":"Modscript Download",
"UpdateSourcePlatform":"Linux",
"UpdateSource":"FetchURL",
"UpdateSourceData":"https://raw.githubusercontent.com/CubeCoders/AMPTemplates/main/dayz-experimentalmodscript.sh",
"UpdateSourceArgs":"modscript.sh",
"UpdateSourceData":"https://raw.githubusercontent.com/CubeCoders/AMPTemplates/main/dayz-experimentalconvertmods.sh",
"UpdateSourceArgs":"convertmods.sh",
"UpdateSourceTarget":"{{$FullInstanceDir}}",
"OverwriteExistingFiles":true
},
{
"UpdateStageName":"Convert and Symlink Mods",
"UpdateStageName":"Convert Mods",
"UpdateSourcePlatform":"Linux",
"UpdateSource":"Executable",
"UpdateSourceData":"/bin/bash",
"UpdateSourceArgs":"./modscript.sh"
},
{
"UpdateStageName":"Link Mods",
"UpdateSourcePlatform":"Windows",
"UpdateSource":"Executable",
"UpdateSourceData":"cmd.exe",
"UpdateSourceArgs":"/C cd .\\dayz\\1042420 && for /D %G in (.\\steamapps\\workshop\\content\\221100\\*) do mklink /J %~nxG %G"
"UpdateSourceArgs":"./convertmods.sh"
}
]