File tree Expand file tree Collapse file tree 4 files changed +13
-13
lines changed Expand file tree Collapse file tree 4 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ function Copy-AWS
27
27
{
28
28
$aws_info = Get-Content - Path " $root \aws_info.txt" | ConvertFrom-StringData
29
29
$keypath = " $root \$ ( $aws_info.keyfile ) "
30
- $host = $aws_info.dns
30
+ $host = $aws_info.host
31
31
}
32
32
33
33
@@ -107,25 +107,25 @@ http://the.earth.li/~sgtatham/putty/0.60/htmldoc/Chapter5.html
107
107
}
108
108
109
109
110
- function Get-Root ([string ] $path )
110
+ function Get-Root ([string ] $CurrentPath , [ string ] $FolderName )
111
111
{
112
- Write-Verbose $path
112
+ Write-Verbose $CurrentPath
113
113
114
- if (Get-ChildItem $path \ * .aws )
114
+ if (Test-Path $CurrentPath \ $FolderName )
115
115
{
116
- return " $path \.aws "
116
+ return " $CurrentPath \ $FolderName "
117
117
}
118
118
119
- $root = [System.IO.Directory ]::GetDirectoryRoot($path )
120
- if ($path -eq $root )
119
+ $driveRoot = [System.IO.Directory ]::GetDirectoryRoot($CurrentPath )
120
+ if ($CurrentPath -eq $driveRoot )
121
121
{
122
- Write-Host " Path name : $path is equal to root name : $root "
123
- Write-Host " root path .aws not found."
122
+ Write-Host " Path: $CurrentPath is the drive root: $driveRoot "
123
+ Write-Host " root path .pscp not found."
124
124
return
125
125
}
126
126
127
- $path = ([System.IO.Directory ]::GetParent(($path ))).FullName
128
- Get-Root $path
127
+ $CurrentPath = ([System.IO.Directory ]::GetParent(($CurrentPath ))).FullName
128
+ Get-Root $CurrentPath $FolderName
129
129
130
130
}
131
131
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ keyfile=my_key_pair.ppk
2
+ host=ec2-00-00-00-00.us-west-2.compute.amazonaws.com
File renamed without changes.
You can’t perform that action at this time.
0 commit comments