-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutest.ps1
26 lines (21 loc) · 823 Bytes
/
utest.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
$file="u"
Write-Output "C, Java, JS Polyquine"
Write-Output "$([char]27)[94m------ C ------$([char]27)[0m"
gcc -x c ".\$file" -o "$file.temp.exe" -std=c11
&".\$file.temp.exe" | out-file "$file.temp.c" -encoding ascii
fc.exe "$file" "$file.temp.c"
Remove-Item "$file.temp.exe"
Remove-Item "$file.temp.c"
Write-Output "$([char]27)[94m------ JAVA ------$([char]27)[0m"
Copy-Item "$file" "$file.java"
javac "$file.java"
java "$file" | out-file "$file.temp.java" -encoding ascii
fc.exe "$file" "$file.temp.java"
Remove-Item "$file.java"
Remove-Item "$file.class"
Remove-Item "$file.temp.java"
Write-Output "$([char]27)[94m------ JS ------$([char]27)[0m"
node "$file" | out-file "$file.temp.js" -encoding ascii
fc.exe "$file" "$file.temp.js"
Remove-Item "$file.temp.js"
Write-Output "$((Get-Item ".\$file").Length) bytes`n"