Something went wrong. Try again.
Completely reimplimented in zig (eventually)
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536#!/bin/shhere="$(cd -P -- $(dirname -- "$0") && pwd)"# on mac, ipecmd launcher could be a symlink elsewhereif [ -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 )"fiexport 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_pathexport 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_ipeCLASSPATH="$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 setunset DISPLAY$jdk_java -Dfile.encoding=UTF-8 -Djava.awt.headless=true -classpath "$CLASSPATH" $MAIN_CLASS $@