Skip to content

Instantly share code, notes, and snippets.

@brianredbeard
Created December 18, 2021 22:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianredbeard/91493f7c342e26ffeec692ce1c0cdb91 to your computer and use it in GitHub Desktop.
Save brianredbeard/91493f7c342e26ffeec692ce1c0cdb91 to your computer and use it in GitHub Desktop.
Slicer Wrapper
#!/bin/bash
#
# This script should work with Slic3r (https://github.com/slic3r/Slic3r) as
# well as it's derivatives:
# - https://github.com/supermerill/SuperSlicer
# - https://github.com/prusa3d/PrusaSlicer
# The author uses "SuperSlicer" due to it's advanced feature set, installing
# it at the path ~/.local/bin/slicer.sh
#
# CLI options relevant to configuration (derived via CLI with --help-fff):
# --config-compatibility
# This version of Slic3r may not understand configurations produced by
# newest Slic3r versions. For example, newer Slic3r may extend the list
# of supported firmware flavors. One may decide to bail out or to
# substitute an unknown value with a default silently or verbosely.
# (disable, enable, enable_silent; default: enable)
#
# --datadir ABCD
# Load and store settings at the given directory. This is useful for
# maintaining different profiles or including configurations from a
# network storage.
#
# --ignore-nonexistent-config
# Do not fail if a file supplied to --load does not exist.
#
# --load ABCD
# Load configuration from the specified file. It can be used more than
# once to load options from multiple files.
###
# In my configuration I don't automatically prune old versions. As such I
# (generally) need to know the *newest* version, which will be the desired one.
#
#
###
DOWNLOAD_LOCATION="${HOME}/Downloads"
SLICER=$(find ${DOWNLOAD_LOCATION} -maxdepth 1 -name "SuperSlicer*.AppImage" \
| sort | tail -n1)
echo -e "Executing binary ${SLICER}\n---------------------------------\n\n"
# AppImages always need to be executable
chmod a+x ${SLICER}
${SLICER}
# vim: ts=2 sw=2 et tw=80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment