3 if ($args.Count -lt 1) {
4 $scriptName = [Environment]::GetCommandLineArgs()[1]
5 Write-Output "Usage: $scriptName <destination>"
12 systemctl --user stop gandi_dns_update
16 if (!(Test-Path -Path $destination)) {
17 New-Item -ItemType directory -Path $destination
20 strip target/release/gandi_dns_update # To reduce the executable size.
21 Copy-Item target/release/gandi_dns_update -Destination $destination
23 # Do not overwrite the configuration.
24 if (!(Test-Path -Path $destination/config.ron)) {
25 Copy-Item config.ron -Destination $destination
28 systemctl --user start gandi_dns_update