From 4202255012a7c6ab2b5a82e546ac3332332e07e1 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Wed, 7 May 2014 22:50:56 +0200 Subject: slic3r: adjust the starter script for newer versions of slic3r Signed-off-by: Florian Pritz --- slic3r | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'slic3r') diff --git a/slic3r b/slic3r index a8ddc3d..d00a7c4 100755 --- a/slic3r +++ b/slic3r @@ -1,14 +1,24 @@ #!/bin/bash -merged="$HOME/.Slic3r/config.ini.merged" +gitdir="$HOME/git/Slic3r" -truncate -s 0 "$merged" +#merged="$HOME/.Slic3r/config.ini.merged" +#truncate -s 0 "$merged" + +TMPDIR="`mktemp -d "/tmp/slic3r.XXXXXX"`" +locallib="$TMPDIR/local-lib-dir" +trap "rm -rf '${TMPDIR}'" EXIT TERM + +# I don't want to install the libs +mkdir -p "$locallib" +ln -sr "$gitdir/xs/blib/lib/Slic3r/" "$locallib/Slic3r" +ln -sr "$gitdir/xs/blib/arch/auto/" "$locallib/auto" for config in "$HOME"/.Slic3r/*/config.ini; do - #opts+=(--load "$config") - cat "$config" >> "$merged" + opts+=(--load "$config") + #cat "$config" >> "$merged" done -opts+=(--load "$merged") +#opts+=(--load "$merged") -perl "$HOME"/git/Slic3r/slic3r.pl "${opts[@]}" "$@" +perl -I"$locallib" "$gitdir/slic3r.pl" "${opts[@]}" "$@" -- cgit v1.2.3-24-g4f1b