-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathrun.ps1
29 lines (26 loc) · 815 Bytes
/
run.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
27
28
29
$pythonVersion = Invoke-Expression -Command "python -V" 2>&1
$python3Version = Invoke-Expression -Command "python3 -V" 2>&1
$numberVersion = $pythonVersion.Split(" ")
if(![string]::IsNullOrEmpty($pythonVersion))
{
if($numberVersion[1] -like "3*")
{
python telegramexporter.py
Read-Host -Prompt "Press enter to continue..."
}
else
{
Write-Output "Too low Python version found. Please, install a Python version >= 3.6"
Read-Host -Prompt "Press enter to continue..."
}
}
elseif(![string]::IsNullOrEmpty($python3Version))
{
python3 telegramexporter.py
Read-Host -Prompt "Press enter to continue..."
}
else
{
Write-Output "No Python versions found. Please, install a Python version >= 3.6"
Read-Host -Prompt "Press enter to continue..."
}