#!/bin/sh set -e udevadm control --reload-rules if [ -L "/usr/local/mcuxpressoide" ]; then echo "Removing mcuxpressoide symbolic link..." rm /usr/local/mcuxpressoide fi ide_path="/usr/local/mcuxpressoide-11.8.0_1165/ide" if [ -L "$ide_path"/binaries ] ; then rm "$ide_path"/binaries fi for dir in "$ide_path"/plugins/com.nxp.mcuxpresso.tools.bin.linux_* ; do full_path="$dir/binaries" ln -s "${full_path#$ide_path/}" "$ide_path"/binaries ; done if [ -L "$ide_path"/Examples ] ; then rm "$ide_path"/Examples fi for dir in "$ide_path"/plugins/com.nxp.mcuxpresso.tools.wizards_* ; do full_path="$dir/Examples" ln -s "${full_path#$ide_path/}" "$ide_path"/Examples ; done if [ -L "$ide_path"/tools ] ; then rm "$ide_path"/tools fi for dir in "$ide_path"/plugins/com.nxp.mcuxpresso.tools.linux_* ; do full_path="$dir/tools" ln -s "${full_path#$ide_path/}" "$ide_path"/tools ; done if [ -L "$ide_path"/Wizards ] ; then rm "$ide_path"/Wizards fi for dir in "$ide_path"/plugins/com.nxp.mcuxpresso.tools.wizards_* ; do full_path="$dir/Wizards" ln -s "${full_path#$ide_path/}" "$ide_path"/Wizards ; done ln -s /usr/local/mcuxpressoide-11.8.0_1165 /usr/local/mcuxpressoide echo "INFO: Created mcuxpressoide symbolic link on /usr/local/mcuxpressoide"