Skip to content

Commit

Permalink
add support for platypus in dev/symlink mode (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
actualben authored Feb 25, 2025
1 parent 7837ac6 commit d75debc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions bambu-add-ip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@
set -eu
SELF=$(basename "$0" '.sh')

if [ "$SELF" = "script" ]; then
if [ -L "$SELF" ]; then
# workaround/enhancement for platypus in dev/symlink mode
SCRIPT_PATH=$(readlink "$0")
SELF=$(basename "$SCRIPT_PATH" '.sh')
else
SELF="bambu-add-ip"
fi
fi

# set defaults (see usage below for more info)
CONFIG_FILE="${CONFIG_FILE:-${HOME}/.${SELF}.cfg}"
SLICER_IP="${SLICER_IP:-127.0.0.1}"
Expand Down

0 comments on commit d75debc

Please sign in to comment.