Restored gtk-3 installation (#3472)
[platform/upstream/dldt.git] / scripts / install_dependencies / install_NCS_udev_rules.sh
1 #!/bin/bash
2
3 # Copyright (c) 2018-2019 Intel Corporation
4 #
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 #      http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16
17 echo "Updating udev rules..."
18
19 if [ -z "$INTEL_OPENVINO_DIR" ]; then
20     echo "Please set up your environment. Run 'source <OPENVINO_INSTALLDIR>/bin/setupvars.sh'."
21     exit -1
22 fi
23
24 if [ -f "$INTEL_OPENVINO_DIR/deployment_tools/inference_engine/external/97-myriad-usbboot.rules" ]; then
25     sudo usermod -a -G users "$(whoami)"
26
27     sudo cp "$INTEL_OPENVINO_DIR/deployment_tools/inference_engine/external/97-myriad-usbboot.rules" /etc/udev/rules.d/
28     sudo udevadm control --reload-rules
29     sudo udevadm trigger
30     sudo ldconfig
31     echo "Udev rules have been successfully installed."
32 else
33     echo "File '97-myriad-usbboot.rules' is missing. Please make sure you installed 'Inference Engine Runtime for Intel® Movidius™ VPU'."
34     exit -1
35 fi 
36
37