Advertisement
Guest User

upload accelerate 2012

a guest
May 2nd, 2012
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $zip_name = "{SECRET-ID}.zip"
  2. $zip_path = "c:\Program Files\7-Zip\7z.exe"
  3. $uri = "http://intel-software-academic-program.com/ayc-upload/upload.php"
  4.  
  5. if ([IO.File]::Exists($zip_name)) {
  6.     rm $zip_name
  7. }
  8. $temp_dir = [IO.Path]::Combine($PWD, [IO.Path]::GetRandomFileName())
  9. mkdir $temp_dir
  10. copy "Makefile" $temp_dir
  11. mkdir ([IO.Path]::Combine($temp_dir, "obj"))
  12. $src = [IO.Path]::Combine($temp_dir, "src")
  13. mkdir $src
  14. copy ./* -Include "*.cpp","*.h","*.c" -Destination $src
  15. &$zip_path "a", $zip_name, ($temp_dir+"\*")
  16. rmdir $temp_dir -Force -Recurse
  17. $client = New-Object System.Net.WebClient
  18. echo "uploading..."
  19. echo ([System.Text.Encoding]::ASCII.GetString($client.UploadFile($uri, $zip_name)))
  20. rm $zip_name
  21. echo "Press any key to close..."
  22. $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement