add retic.exe download to install script
This commit is contained in:
@@ -2,3 +2,4 @@ local.exclude
|
|||||||
logs
|
logs
|
||||||
restic.exe
|
restic.exe
|
||||||
secrets.ps1
|
secrets.ps1
|
||||||
|
state.xml
|
||||||
+2
-1
@@ -1,6 +1,7 @@
|
|||||||
# backup configuration
|
# backup configuration
|
||||||
|
$ExeName = "restic.exe"
|
||||||
$InstallPath = "C:\restic"
|
$InstallPath = "C:\restic"
|
||||||
$ResticExe = Join-Path $InstallPath "restic.exe"
|
$ResticExe = Join-Path $InstallPath $ExeName
|
||||||
$StateFile = Join-Path $InstallPath "state.xml"
|
$StateFile = Join-Path $InstallPath "state.xml"
|
||||||
$WindowsExcludeFile = Join-Path $InstallPath "windows.exclude"
|
$WindowsExcludeFile = Join-Path $InstallPath "windows.exclude"
|
||||||
$LocalExcludeFile = Join-Path $InstallPath "local.exclude"
|
$LocalExcludeFile = Join-Path $InstallPath "local.exclude"
|
||||||
|
|||||||
+10
@@ -1,5 +1,15 @@
|
|||||||
. .\config.ps1
|
. .\config.ps1
|
||||||
|
|
||||||
|
# download restic
|
||||||
|
if(-not (Test-Path $ResticExe)) {
|
||||||
|
$url = "https://github.com/restic/restic/releases/download/v0.9.6/restic_0.9.6_windows_amd64.zip"
|
||||||
|
$output = Join-Path $InstallPath "restic.zip"
|
||||||
|
Invoke-WebRequest -Uri $url -OutFile $output
|
||||||
|
Expand-Archive -LiteralPath $output $InstallPath
|
||||||
|
Remove-Item $output
|
||||||
|
Get-ChildItem *.exe | Rename-Item -NewName $ExeName
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Create log directory if it doesn't exit
|
# Create log directory if it doesn't exit
|
||||||
if(-not (Test-Path $LogPath)) {
|
if(-not (Test-Path $LogPath)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user