This commit is contained in:
Cyril 2024-05-29 00:13:52 +02:00
parent 32c970116f
commit 70268f003f
17 changed files with 1007 additions and 247 deletions

View file

@ -36,24 +36,29 @@ function install_screws_tilt_adjust(){
mv "$KLIPPER_EXTRAS_FOLDER"/screws_tilt_adjust.pyc "$HS_BACKUP_FOLDER"/screws-tilt-adjust
fi
echo
local printer_choice
while true; do
read -p " ${white}Do you want install it for ${yellow}K1${white} or ${yellow}K1 Max${white}? (${yellow}k1${white}/${yellow}k1max${white}): ${yellow}" printer_choice
case "${printer_choice}" in
K1|k1)
echo -e "${white}"
echo -e "Info: Linking files..."
ln -sf "$SCREWS_ADJUST_K1_URL" "$HS_CONFIG_FOLDER"/screws-tilt-adjust.cfg
break;;
K1MAX|k1max)
echo -e "${white}"
echo -e "Info: Linking files..."
ln -sf "$SCREWS_ADJUST_K1M_URL" "$HS_CONFIG_FOLDER"/screws-tilt-adjust.cfg
break;;
*)
error_msg "Please select a correct choice!";;
esac
done
if [ "$model" = "K1" ]; then
local printer_choice
while true; do
read -p " ${white}Do you want install it for ${yellow}K1${white} or ${yellow}K1 Max${white}? (${yellow}k1${white}/${yellow}k1max${white}): ${yellow}" printer_choice
case "${printer_choice}" in
K1|k1)
echo -e "${white}"
echo -e "Info: Linking files..."
ln -sf "$SCREWS_ADJUST_K1_URL" "$HS_CONFIG_FOLDER"/screws-tilt-adjust.cfg
break;;
K1MAX|k1max)
echo -e "${white}"
echo -e "Info: Linking files..."
ln -sf "$SCREWS_ADJUST_K1M_URL" "$HS_CONFIG_FOLDER"/screws-tilt-adjust.cfg
break;;
*)
error_msg "Please select a correct choice!";;
esac
done
else
echo -e "Info: Linking files..."
ln -sf "$SCREWS_ADJUST_3KE_URL" "$HS_CONFIG_FOLDER"/screws-tilt-adjust.cfg
fi
ln -sf "$SCREWS_ADJUST_URL" "$KLIPPER_EXTRAS_FOLDER"/screws_tilt_adjust.py
if grep -q "include Helper-Script/screws-tilt-adjust" "$PRINTER_CFG" ; then
echo -e "Info: Screws Tilt Adjust Support configurations are already enabled in printer.cfg file..."