Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $zip_name = "{SECRET-ID}.zip"
- $zip_path = "c:\Program Files\7-Zip\7z.exe"
- $uri = "http://intel-software-academic-program.com/ayc-upload/upload.php"
- if ([IO.File]::Exists($zip_name)) {
- rm $zip_name
- }
- $temp_dir = [IO.Path]::Combine($PWD, [IO.Path]::GetRandomFileName())
- mkdir $temp_dir
- copy "Makefile" $temp_dir
- mkdir ([IO.Path]::Combine($temp_dir, "obj"))
- $src = [IO.Path]::Combine($temp_dir, "src")
- mkdir $src
- copy ./* -Include "*.cpp","*.h","*.c" -Destination $src
- &$zip_path "a", $zip_name, ($temp_dir+"\*")
- rmdir $temp_dir -Force -Recurse
- $client = New-Object System.Net.WebClient
- echo "uploading..."
- echo ([System.Text.Encoding]::ASCII.GetString($client.UploadFile($uri, $zip_name)))
- rm $zip_name
- echo "Press any key to close..."
- $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement