#!/bin/sh here="$(cd -P -- $(dirname -- "$0") && pwd)" # on mac, ipecmd launcher could be a symlink elsewhere if [ -h "$0" ]; then symlink_target="$( ls -ld "$0" | awk '{print $NF}' )" case "$symlink_target" in /*) # symlink_target is absolute, use it as is ;; *) # symlink_target is relative, prepend with $here symlink_target=$here/$symlink_target ;; esac here="$( cd -P "$( dirname -- "$symlink_target" )" && pwd )" fi export cluster_dir=$here # platform_bin_path which refers to /Applications/microchip/mplabx/vX.XX/mplab_platform/bin/ export platform_bin_path=$cluster_dir/../bin/ # PATH needs to be appended with the platform_bin_path export PATH="$platform_bin_path:$PATH" export ipecmd_jar="$cluster_dir/ipecmd.jar" cd $platform_bin_path # common-vars.sh provides mplab_user_dir and jdk_java . $platform_bin_path/common-vars.sh mplab_ipe CLASSPATH="$mplab_user_dir/modules/*:$mplab_user_dir/modules/ext/*:$ipecmd_jar" MAIN_CLASS="com.microchip.mplab.ipecmd.IPECMD" # Linux will ignore headless mode if DISPLAY is set unset DISPLAY $jdk_java -Dfile.encoding=UTF-8 -Djava.awt.headless=true -classpath "$CLASSPATH" $MAIN_CLASS $@