Skip to content

Commit 6620b10

Browse files
authored
Merge pull request #752 from PetrNovota/PetrNovota-installation_script_fix
Petr novota installation script fix
2 parents 077d62e + 44bb954 commit 6620b10

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

docs/source/_static/install_depthai.sh

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ trap 'RET=$? ; echo -e >&2 "\n\x1b[31mFailed installing dependencies. Could be a
1212
while [ "$path_correct" = "false" ]
1313
do
1414
echo ""
15-
read -p $'ENTER absolute installation path for depthai or leave empty and default path: $HOME will be used.\n' -r install_path
15+
echo 'ENTER absolute installation path for depthai or leave empty and default path: $HOME will be used.'
16+
read install_path < /dev/tty
1617
echo ""
1718

1819
if [ "$install_path" = "" ]; then
@@ -44,15 +45,16 @@ python_version_number=""
4445
if [[ "$python_version" != 'Python'* ]]; then
4546
python_version=""
4647
fi
47-
echo $'\n'
48+
echo ""
4849

4950
# check default python version, offer it to the user or get another one
5051
while [ "$python_chosen" = "false" ]
5152
do
5253
if [[ "$python_version" == "" ]]; then
5354
echo "No python version found."
5455
echo "Input path for python binary, version 3.8 or higher, or leave empty and python 3.10 will be installed for you."
55-
read -p $'Press any key to continue\n' -r python_binary_path
56+
echo "Press any key to continue"
57+
read python_binary_path < /dev/tty
5658
# python not found and user wants to install python 3.10
5759
if [ "$python_binary_path" = "" ]; then
5860
install_python="true"
@@ -65,14 +67,16 @@ do
6567
echo "Python version: $python_version found."
6668
if [ "$nr_1" -gt 2 ] && [ "$nr_2" -gt 7 ]; then # first two digits of python version greater then 3.7 -> python version 3.8 or greater is allowed.
6769
echo "If you want to use it for installation, press ANY key, otherwise input path to python binary."
68-
read -p $'Press any key to continue\n' -r python_binary_path
70+
echo "Press any key to continue"
71+
read python_binary_path < /dev/tty
6972
# user wants to use already installed python whose version is high enough
7073
if [ "$python_binary_path" = "" ]; then
7174
python_chosen="true"
7275
fi
7376
else
7477
echo "This python version is not supported by depthai. Enter path to python binary version et least 3.8, or leave empty and python 3.10 will be installed automatically."
75-
read -p $'Press any key to continue\n' -r python_binary_path
78+
echo "Press any key to continue"
79+
read python_binary_path < /dev/tty
7680
# python version is too low and user wants to install python 3.10
7781
if [ "$python_binary_path" = "" ]; then
7882
install_python="true"
@@ -229,6 +233,7 @@ fi
229233

230234
echo -e '\n\n:::::::::::::::: INSTALATION COMPLETE ::::::::::::::::\n'
231235
echo -e '\nTo run demo app write <depthai_launcher> in terminal.'
232-
read -rsp $'Press ANY KEY to finish and run the demo app...\n' -n1 key
236+
echo "Press ANY KEY to finish and run the demo app..."
237+
read -n1 key < /dev/tty
233238
echo "STARTING DEMO APP."
234239
python "$DEPTHAI_DIR/launcher/launcher.py" -r "$DEPTHAI_DIR"

0 commit comments

Comments
 (0)