-
Notifications
You must be signed in to change notification settings - Fork 1
/
run.ps1
48 lines (48 loc) · 1.27 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
Write-Output "To Do PoC App Installer"
Write-Output "Note that this script may be system specific, so verify its contents in case of an error"
$VALID = read-host "Do you have python3 and pip3 installed? Y (yes) / N (no)"
if ($VALID -eq "Y" -OR $VALID -eq "y")
{
$CHOICE = read-host "What do you want to do? install [I] / uninstall [U]"
switch ($CHOICE) {
"I" {} "i"
{
$DEV = read-host "Do you want to install in Development mode? Y (yes) / N (no)"
if ( $DEV -eq "Y" -OR $DEV -eq "y" )
{
pip3 install -e ./todopoc
}
else
{
pip3 install ./todopoc
}
if ( $? )
{
Write-Output "App has been installed"
}
else
{
Write-Output "There was some error"
}
break
}
"u" {} "U"
{
pip3 uninstall todopoc
if ( $? )
{
Write-Output "App has been uninstalled"
}
else
{
Write-Output "There was some error"
}
break
}
}
}
else
{
Write-Output "Install python and pip and then try again"
}