mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-19 22:04:27 +05:00
script: remove KlipperScreen.log symlink dialog.
This commit is contained in:
@@ -2,13 +2,8 @@ install_klipperscreen(){
|
|||||||
python3_check
|
python3_check
|
||||||
if [ $py_chk_ok = "true" ]; then
|
if [ $py_chk_ok = "true" ]; then
|
||||||
source_kiauh_ini
|
source_kiauh_ini
|
||||||
system_check_klipperscreen
|
|
||||||
#ask user for customization
|
|
||||||
get_user_selections_klipperscreen
|
|
||||||
#KlipperScreen main installation
|
#KlipperScreen main installation
|
||||||
klipperscreen_setup
|
klipperscreen_setup
|
||||||
#execute customizations
|
|
||||||
symlinks_klipperscreen
|
|
||||||
#after install actions
|
#after install actions
|
||||||
restart_klipperscreen
|
restart_klipperscreen
|
||||||
else
|
else
|
||||||
@@ -29,57 +24,16 @@ python3_check(){
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
system_check_klipperscreen(){
|
|
||||||
source_kiauh_ini
|
|
||||||
if [ ! -e $klipper_cfg_loc/KlipperScreen.log ]; then
|
|
||||||
KLIPPERSCREEN_SL_FOUND="false"
|
|
||||||
else
|
|
||||||
KLIPPERSCREEN_SL_FOUND="true"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
get_user_selections_klipperscreen(){
|
|
||||||
#user selection for KlipperScreen.log symlink
|
|
||||||
if [ "$KLIPPERSCREEN_SL_FOUND" = "false" ]; then
|
|
||||||
while true; do
|
|
||||||
echo
|
|
||||||
read -p "${cyan}###### Create KlipperScreen.log symlink? (y/N):${default} " yn
|
|
||||||
case "$yn" in
|
|
||||||
Y|y|Yes|yes)
|
|
||||||
echo -e "###### > Yes"
|
|
||||||
SEL_KSLOG_SL="true"
|
|
||||||
break;;
|
|
||||||
N|n|No|no|"")
|
|
||||||
echo -e "###### > No"
|
|
||||||
SEL_KSLOG_SL="false"
|
|
||||||
break;;
|
|
||||||
*)
|
|
||||||
print_unkown_cmd
|
|
||||||
print_msg && clear_msg;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
klipperscreen_setup(){
|
klipperscreen_setup(){
|
||||||
dep=(wget curl unzip dfu-util)
|
dep=(wget curl unzip dfu-util)
|
||||||
dependency_check
|
dependency_check
|
||||||
status_msg "Downloading KlipperScreen ..."
|
status_msg "Downloading KlipperScreen ..."
|
||||||
#force remove existing KlipperScreen dir
|
# force remove existing KlipperScreen dir
|
||||||
[ -d $KLIPPERSCREEN_DIR ] && rm -rf $KLIPPERSCREEN_DIR
|
[ -d $KLIPPERSCREEN_DIR ] && rm -rf $KLIPPERSCREEN_DIR
|
||||||
#clone into fresh KlipperScreen dir
|
# clone into fresh KlipperScreen dir
|
||||||
cd ${HOME} && git clone $KLIPPERSCREEN_REPO
|
cd ${HOME} && git clone $KLIPPERSCREEN_REPO
|
||||||
ok_msg "Download complete!"
|
ok_msg "Download complete!"
|
||||||
status_msg "Installing KlipperScreen ..."
|
status_msg "Installing KlipperScreen ..."
|
||||||
$KLIPPERSCREEN_DIR/scripts/KlipperScreen-install.sh
|
$KLIPPERSCREEN_DIR/scripts/KlipperScreen-install.sh
|
||||||
echo; ok_msg "KlipperScreen successfully installed!"
|
ok_msg "KlipperScreen successfully installed!"
|
||||||
}
|
|
||||||
|
|
||||||
symlinks_klipperscreen(){
|
|
||||||
#create a KlipperScreen.log symlink in klipper_config-dir just for convenience
|
|
||||||
if [ "$SEL_KSLOG_SL" = "true" ] && [ ! -e $klipper_cfg_loc/KlipperScreen.log ]; then
|
|
||||||
status_msg "Creating KlipperScreen.log symlink ..."
|
|
||||||
ln -s /tmp/KlipperScreen.log $klipper_cfg_loc
|
|
||||||
ok_msg "Symlink created!"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user