Skip to content

Instantly share code, notes, and snippets.

@jonnybest
Created August 30, 2011 06:41
Show Gist options
  • Save jonnybest/1180336 to your computer and use it in GitHub Desktop.
Save jonnybest/1180336 to your computer and use it in GitHub Desktop.

Revisions

  1. Jonathan Best revised this gist Sep 6, 2011. 1 changed file with 3 additions and 6 deletions.
    9 changes: 3 additions & 6 deletions update-coapp.ps1
    Original file line number Diff line number Diff line change
    @@ -1,12 +1,9 @@
    $git = $env:programfiles+"\Git\cmd\git.cmd";
    if (!$git) {
    Write-Host "This is probably the first time you run this script.
    Write-Host "Something went wrong.
    Please enter the path to git.cmd or git.exe:";
    $git = Read-Host;
    Set-Variable -Name git -Value $git -Scope 1;
    }
    else {
    Write-Host "Git is located at " $git;
    # Something like "C:\Program Files\Git\cmd\git.cmd"
    Set-Variable -Name git -Value $git;
    }
    ls -name -Exclude *.* | foreach {cd .\$_ ; .$git pull origin master ; cd ..}
    Write-Host "Done.";
  2. Jonathan Best created this gist Aug 30, 2011.
    12 changes: 12 additions & 0 deletions update-coapp.ps1
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    if (!$git) {
    Write-Host "This is probably the first time you run this script.
    Please enter the path to git.cmd or git.exe:";
    $git = Read-Host;
    Set-Variable -Name git -Value $git -Scope 1;
    }
    else {
    Write-Host "Git is located at " $git;
    # Something like "C:\Program Files\Git\cmd\git.cmd"
    }
    ls -name -Exclude *.* | foreach {cd .\$_ ; .$git pull origin master ; cd ..}
    Write-Host "Done.";