Skip to content

Commit

Permalink
add the klippy/extras to the klipper/.git/info/exclude so they do not…
Browse files Browse the repository at this point in the history
… show up as untracked source files
  • Loading branch information
pellcorp committed May 28, 2024
1 parent 7c16964 commit 256dfe0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
10 changes: 8 additions & 2 deletions installer-deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,17 @@ install_services() {
install_guppy_goodies() {
printf "${green}Setting up Guppy Macros ${white}\n"
if [ ! -f $GCODE_SHELL_CMD ]; then
printf "${green}Installing gcode_shell_command.py for klippy ${white}\n"
cp $GUPPY_DIR/k1_mods/gcode_shell_command.py $GCODE_SHELL_CMD
printf "${green}Installing gcode_shell_command.py for klippy ${white}\n"
cp $GUPPY_DIR/k1_mods/gcode_shell_command.py $GCODE_SHELL_CMD
if ! grep -q "klippy/extras/gcode_shell_command.py" "$KLIPPER_PATH/.git/info/exclude"; then
echo "klippy/extras/gcode_shell_command.py" >> "$KLIPPER_PATH/.git/info/exclude"
fi
fi

cp $GUPPY_DIR/k1_mods/calibrate_shaper_config.py $SHAPER_CONFIG
if ! grep -q "klippy/extras/calibrate_shaper_config.py" "$KLIPPER_PATH/.git/info/exclude"; then
echo "klippy/extras/calibrate_shaper_config.py" >> "$KLIPPER_PATH/.git/info/exclude"
fi

mkdir -p $CONFIG_DIR/GuppyScreen/scripts
sed -i "s|<CONFIG_DIR>|$CONFIG_DIR|g; s|<KLIPPER_PATH>|$KLIPPER_PATH|g" $GUPPY_DIR/debian/guppy_cmd.cfg
Expand Down
11 changes: 11 additions & 0 deletions installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ printf "${green}Setting up Guppy Macros ${white}\n"
if [ ! -f $GCODE_SHELL_CMD ]; then
printf "${green}Installing gcode_shell_command.py for klippy ${white}\n"
cp $K1_GUPPY_DIR/k1_mods/gcode_shell_command.py $GCODE_SHELL_CMD
if ! grep -q "klippy/extras/gcode_shell_command.py" "$KLIPPER_PATH/.git/info/exclude"; then
echo "klippy/extras/gcode_shell_command.py" >> "$KLIPPER_PATH/.git/info/exclude"
fi
fi

mkdir -p $K1_CONFIG_DIR/GuppyScreen/scripts
Expand Down Expand Up @@ -179,11 +182,19 @@ printf "${green}Setting up GuppyScreen ${white}\n"
cp $K1_GUPPY_DIR/k1_mods/S99guppyscreen /etc/init.d/S99guppyscreen

cp $K1_GUPPY_DIR/k1_mods/calibrate_shaper_config.py $SHAPER_CONFIG
if ! grep -q "klippy/extras/calibrate_shaper_config.py" "$KLIPPER_PATH/.git/info/exclude"; then
echo "klippy/extras/calibrate_shaper_config.py" >> "$KLIPPER_PATH/.git/info/exclude"
fi

ln -sf $K1_GUPPY_DIR/k1_mods/guppy_module_loader.py $KLIPPY_EXTRA_DIR/guppy_module_loader.py
ln -sf $K1_GUPPY_DIR/k1_mods/guppy_config_helper.py $KLIPPY_EXTRA_DIR/guppy_config_helper.py
ln -sf $K1_GUPPY_DIR/k1_mods/tmcstatus.py $KLIPPY_EXTRA_DIR/tmcstatus.py

for file in guppy_module_loader.py guppy_config_helper.py tmcstatus.py; do
if ! grep -q "klippy/extras/${file}" "$KLIPPER_PATH/.git/info/exclude"; then
echo "klippy/extras/$file" >> "$KLIPPER_PATH/.git/info/exclude"
fi
done

if [ ! -d "/usr/lib/python3.8/site-packages/matplotlib-2.2.3-py3.8.egg-info" ]; then
echo "Not replacing mathplotlib ft2font module. PSD graphs might not work"
Expand Down

0 comments on commit 256dfe0

Please sign in to comment.