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.DisplayName=Arma 3
App.RootDir=./arma3/ App.RootDir=./arma3/
App.BaseDirectory=./arma3/233780/ App.BaseDirectory=./arma3/233780/
App.SteamWorkshopDownloadLocation={{$FullBaseDir}}
App.ExecutableWin=233780\ArmA3Server_x64.exe App.ExecutableWin=233780\ArmA3Server_x64.exe
App.ExecutableLinux=233780/arma3server_x64 App.ExecutableLinux=233780/arma3server_x64
App.WorkingDir=233780 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", "UpdateStageName":"Modscript Download",
"UpdateSourcePlatform":"Linux", "UpdateSourcePlatform":"Linux",
"UpdateSource":"FetchURL", "UpdateSource":"FetchURL",
"UpdateSourceData":"https://github.com/CubeCoders/AMPTemplates/raw/main/arma3modscript.sh", "UpdateSourceData":"https://github.com/CubeCoders/AMPTemplates/raw/main/arma3convertmods.sh",
"UpdateSourceArgs":"modscript.sh", "UpdateSourceArgs":"convertmods.sh",
"UpdateSourceTarget":"{{$FullInstanceDir}}", "UpdateSourceTarget":"{{$FullInstanceDir}}",
"OverwriteExistingFiles":true "OverwriteExistingFiles":true
}, },
{ {
"UpdateStageName":"Convert and Symlink Mods", "UpdateStageName":"Convert Mods",
"UpdateSourcePlatform":"Linux", "UpdateSourcePlatform":"Linux",
"UpdateSource":"Executable", "UpdateSource":"Executable",
"UpdateSourceData":"/bin/bash", "UpdateSourceData":"/bin/bash",
"UpdateSourceArgs":"./modscript.sh" "UpdateSourceArgs":"./convertmods.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"
} }
] ]

View File

@ -22,6 +22,7 @@ Meta.NoCommercialUsage=False
App.DisplayName=DayZ (Experimental) App.DisplayName=DayZ (Experimental)
App.RootDir=./dayz/ App.RootDir=./dayz/
App.BaseDirectory=./dayz/1042420/ App.BaseDirectory=./dayz/1042420/
App.SteamWorkshopDownloadLocation={{$FullBaseDir}}
App.ExecutableWin=1042420\DayZServer_x64.exe App.ExecutableWin=1042420\DayZServer_x64.exe
App.ExecutableLinux=1042420/DayZServer App.ExecutableLinux=1042420/DayZServer
App.WorkingDir=1042420 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", "UpdateStageName":"Modscript Download",
"UpdateSourcePlatform":"Linux", "UpdateSourcePlatform":"Linux",
"UpdateSource":"FetchURL", "UpdateSource":"FetchURL",
"UpdateSourceData":"https://raw.githubusercontent.com/CubeCoders/AMPTemplates/main/dayz-experimentalmodscript.sh", "UpdateSourceData":"https://raw.githubusercontent.com/CubeCoders/AMPTemplates/main/dayz-experimentalconvertmods.sh",
"UpdateSourceArgs":"modscript.sh", "UpdateSourceArgs":"convertmods.sh",
"UpdateSourceTarget":"{{$FullInstanceDir}}", "UpdateSourceTarget":"{{$FullInstanceDir}}",
"OverwriteExistingFiles":true "OverwriteExistingFiles":true
}, },
{ {
"UpdateStageName":"Convert and Symlink Mods", "UpdateStageName":"Convert Mods",
"UpdateSourcePlatform":"Linux", "UpdateSourcePlatform":"Linux",
"UpdateSource":"Executable", "UpdateSource":"Executable",
"UpdateSourceData":"/bin/bash", "UpdateSourceData":"/bin/bash",
"UpdateSourceArgs":"./modscript.sh" "UpdateSourceArgs":"./convertmods.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"
} }
] ]