+#!/usr/bin/env pwsh
+
if ($args.Count -lt 1) {
$scriptName = [Environment]::GetCommandLineArgs()[1]
Write-Output "Usage: $scriptName <destination>"
git pull
cargo build --release
-systemctl --user stop valheim-web
+systemctl --user stop valheim_web
$destination=$args[0]
New-Item -ItemType directory -Path $destination
}
-strip target/release/valheim-web # To reduce the executable size.
-Copy-Item target/release/valheim-web -Destination $destination
+strip target/release/valheim_web # To reduce the executable size.
+Copy-Item target/release/valheim_web -Destination $destination
-Copy-Item static -Destination $destination -Recurse -Force
+Copy-Item backend/static -Destination $destination -Recurse -Force
# Do not overwrite the configuration.
if (!(Test-Path -Path $destination/conf.ron)) {
- Copy-Item conf.ron -Destination $destination
+ Copy-Item backend/conf.ron -Destination $destination
}
-systemctl --user start valheim-web
+systemctl --user start valheim_web