3 if ($args.Count -lt 1) {
4 $scriptName = [Environment]::GetCommandLineArgs()[1]
5 Write-Output "Usage: $scriptName <destination>"
12 systemctl --user stop valheim_web
16 if (!(Test-Path -Path $destination)) {
17 New-Item -ItemType directory -Path $destination
20 strip target/release/valheim_web # To reduce the executable size.
21 Copy-Item target/release/valheim_web -Destination $destination
23 Copy-Item backend/static -Destination $destination -Recurse -Force -Exclude style.css.map
25 # Do not overwrite the configuration.
26 if (!(Test-Path -Path $destination/conf.ron)) {
27 Copy-Item backend/conf.ron -Destination $destination
30 systemctl --user start valheim_web