6 rm -f /tmp/ncsdk_redirector.txt
8 if [ -f ncsdk_redirector.txt ]
10 cp ncsdk_redirector.txt /tmp
14 wget --no-cache http://ncs-forum-uploads.s3.amazonaws.com/ncsdk/ncsdk_01_11/ncsdk_redirector.txt
17 download_filename=NCSDK-1.11.tar.gz
19 # redirector is the url from redirector text file
20 redirector=$(<ncsdk_redirector.txt)
22 # ncsdk_link is the url with '\r' deleted if it exists
23 # would probably be from editing in windows/dos
24 ncsdk_link=$(echo "$redirector" | tr -d '\r')
26 # download the payload from the redirector link
27 # and save it the download_filename no matter what the original filename was
28 wget --no-cache -O ${download_filename} $ncsdk_link
30 # Get the filenames, ncsdk_archive is just the download filename
31 # and ncsdk_pkg is the filename without the .tar.gz
32 #ncsdk_archive=$(echo "$ncsdk_link" | grep -o '[^/]*$')
33 ncsdk_archive=${download_filename}
34 ncsdk_pkg=${ncsdk_archive%%.tar.gz}
36 # now install-ncsdk.sh is doing the uninstallation if necessary.
37 # Remove older installation dirs
38 #if [ -f /opt/movidius/uninstall-ncsdk.sh ]
40 # echo "Removing previous install..."
41 # /opt/movidius/uninstall-ncsdk.sh
44 # Create Required installation dirs
45 sudo mkdir -p /opt/movidius
46 sudo cp $ncsdk_archive /opt/movidius/ncsdk.tar.gz
49 # untar the new install and run the install script
50 sudo tar zxvf ./ncsdk.tar.gz
52 sudo mv $ncsdk_pkg* NCSDK
53 cd /opt/movidius/NCSDK
57 # leave the uninstall script on the target
58 #sudo cp ./uninstall-ncsdk.sh ../ncsdk/
64 sudo rm -f /tmp/${ncsdk_archive}