if ($args.Count -lt 1) {
$scriptName = [Environment]::GetCommandLineArgs()[1]
- echo "Usage: $scriptName <destination>"
+ Write-Output "Usage: $scriptName <destination>"
exit 1
}
-
-systemctl --user stop www-rouleunpet.service
-
git pull
cargo build --release
+systemctl --user stop www-rouleunpet.service
+
$destination=$args[0]
if (!(Test-Path -Path $destination)) {
New-Item -ItemType directory -Path $destination
}
+strip target/release/rup # To reduce the executable size.
Copy-Item target/release/rup -Destination $destination
Copy-Item key.secret -Destination $destination