mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-12-23 23:29:02 +01:00
Improve the scripts
This commit is contained in:
parent
9e1c96d46f
commit
bea6e65d49
@ -9,13 +9,9 @@
|
||||
param($TargetDir = "$PWD")
|
||||
|
||||
try {
|
||||
& git --version
|
||||
} catch {
|
||||
write-error "ERROR: can't execute 'git' - make sure Git is installed and available"
|
||||
exit 1
|
||||
}
|
||||
$Null = (git --version)
|
||||
if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" }
|
||||
|
||||
try {
|
||||
$PathToRepo = "$PSScriptRoot/.."
|
||||
$Table = import-csv "$PathToRepo/Data/repos.csv"
|
||||
|
||||
|
@ -12,13 +12,9 @@ if ($EmailAddress -eq "") { $EmailAddress = read-host "Enter your e-mail addre
|
||||
if ($FavoriteEditor -eq "") { $FavoriteEditor = read-host "Enter your favorite text editor (emacs,nano,vi,vim,...)" }
|
||||
|
||||
try {
|
||||
& git --version
|
||||
} catch {
|
||||
write-error "Can't execute 'git' - make sure Git is installed and available"
|
||||
exit 1
|
||||
}
|
||||
$Null = (git --version)
|
||||
if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" }
|
||||
|
||||
try {
|
||||
& git config --global user.name $FullName
|
||||
& git config --global user.email $EmailAddress
|
||||
& git config --global core.editor $FavoriteEditor
|
||||
|
@ -16,7 +16,7 @@ try {
|
||||
if (-not(test-path "$RepoDir" -pathType container)) { throw "Can't access directory: $RepoDir" }
|
||||
set-location "$RepoDir"
|
||||
|
||||
& git --version
|
||||
$Null = (git --version)
|
||||
if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" }
|
||||
|
||||
$Result = (git status)
|
||||
|
@ -16,7 +16,7 @@ try {
|
||||
if (-not(test-path "$RepoDir" -pathType container)) { throw "Can't access directory: $RepoDir" }
|
||||
set-location "$RepoDir"
|
||||
|
||||
& git --version
|
||||
$Null = (git --version)
|
||||
if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" }
|
||||
|
||||
$Result = (git status)
|
||||
|
@ -14,7 +14,7 @@ try {
|
||||
if (-not(test-path "$ParentDir" -pathType container)) { throw "Can't access directory: $ParentDir" }
|
||||
set-location $ParentDir
|
||||
|
||||
& git --version
|
||||
$Null = (git --version)
|
||||
if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" }
|
||||
|
||||
[int]$Count = 0
|
||||
|
@ -12,7 +12,7 @@ try {
|
||||
if (-not(test-path "$RepoDir" -pathType container)) { throw "Can't access directory: $RepoDir" }
|
||||
set-location "$RepoDir"
|
||||
|
||||
& git --version
|
||||
$Null = (git --version)
|
||||
if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" }
|
||||
|
||||
& "$PSScriptRoot/fetch-repo.ps1"
|
||||
|
@ -12,7 +12,7 @@ try {
|
||||
if (-not(test-path "$RepoDir" -pathType container)) { throw "Can't access directory: $RepoDir" }
|
||||
set-location "$RepoDir"
|
||||
|
||||
& git --version
|
||||
$Null = (git --version)
|
||||
if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" }
|
||||
|
||||
& "$PSScriptRoot/fetch-repo.ps1"
|
||||
|
@ -14,7 +14,7 @@ try {
|
||||
if (-not(test-path "$RepoDir" -pathType container)) { throw "Can't access directory: $RepoDir" }
|
||||
set-location "$RepoDir"
|
||||
|
||||
& git --version
|
||||
$Null = (git --version)
|
||||
if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" }
|
||||
|
||||
& "$PSScriptRoot/fetch-repo.ps1"
|
||||
|
@ -14,7 +14,7 @@ try {
|
||||
if (-not(test-path "$ParentDir" -pathType container)) { throw "Can't access directory: $ParentDir" }
|
||||
set-location "$ParentDir"
|
||||
|
||||
& git --version
|
||||
$Null = (git --version)
|
||||
if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" }
|
||||
|
||||
[int]$Count = 0
|
||||
|
@ -13,7 +13,7 @@ try {
|
||||
if (-not(test-path "$RepoDir" -pathType container)) { throw "Can't access directory: $RepoDir" }
|
||||
set-location "$RepoDir"
|
||||
|
||||
& git --version
|
||||
$Null = (git --version)
|
||||
if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" }
|
||||
|
||||
$Result = (git status)
|
||||
|
Loading…
Reference in New Issue
Block a user