remove: function to remove voron brandings from mainsail, mainsail has its own logo now (thx @lixxbox). function therefore obsolete

This commit is contained in:
th33xitus
2020-09-01 14:27:53 +02:00
parent d964523558
commit 4a60b9c8ec
2 changed files with 43 additions and 43 deletions

View File

@@ -189,39 +189,39 @@ print_error(){
fi fi
} }
remove_branding(){ #remove_branding(){
echo # echo
top_border # top_border
echo -e "| This action will remove the Voron brandings from |" # echo -e "| This action will remove the Voron brandings from |"
echo -e "| your Mainsail installation. You have to perform |" # echo -e "| your Mainsail installation. You have to perform |"
echo -e "| this action again, everytime you updated Mainsail. |" # echo -e "| this action again, everytime you updated Mainsail. |"
bottom_border # bottom_border
while true; do # while true; do
read -p "${cyan}###### Do you want to continue? (Y/n):${default} " yn # read -p "${cyan}###### Do you want to continue? (Y/n):${default} " yn
case "$yn" in # case "$yn" in
Y|y|Yes|yes|"") # Y|y|Yes|yes|"")
cd $MAINSAIL_DIR/css # cd $MAINSAIL_DIR/css
FILE=$(find -name "app.*.css" | cut -d"/" -f2) # FILE=$(find -name "app.*.css" | cut -d"/" -f2)
status_msg "Patching file '$FILE' ..." # status_msg "Patching file '$FILE' ..."
cp -n $KLIPPER_DIR/docs/img/klipper-logo-small.png $MAINSAIL_DIR/img/ # cp -n $KLIPPER_DIR/docs/img/klipper-logo-small.png $MAINSAIL_DIR/img/
#write extra lines to app.css # #write extra lines to app.css
echo >> "$FILE" # echo >> "$FILE"
cat < ${HOME}/kiauh/resources/app.css >> "$FILE" # cat < ${HOME}/kiauh/resources/app.css >> "$FILE"
ok_msg "File '$FILE' patched!" # ok_msg "File '$FILE' patched!"
status_msg "Setting new Favicon ..." # status_msg "Setting new Favicon ..."
#backup old favicon # #backup old favicon
cp -n $MAINSAIL_DIR/favicon.ico $MAINSAIL_DIR/voron_favicon.ico # cp -n $MAINSAIL_DIR/favicon.ico $MAINSAIL_DIR/voron_favicon.ico
cp ${HOME}/kiauh/resources/favicon.ico $MAINSAIL_DIR/favicon.ico # cp ${HOME}/kiauh/resources/favicon.ico $MAINSAIL_DIR/favicon.ico
ok_msg "Icon set!" # ok_msg "Icon set!"
echo # echo
ok_msg "Brandings removed!" # ok_msg "Brandings removed!"
ok_msg "Clear browser cache and reload Mainsail (F5)!" # ok_msg "Clear browser cache and reload Mainsail (F5)!"
echo # echo
break;; # break;;
N|n|No|no) break;; # N|n|No|no) break;;
esac # esac
done # done
} #}
install_extension_shell_command(){ install_extension_shell_command(){
echo echo

View File

@@ -8,11 +8,11 @@ advanced_ui(){
echo -e "| Klipper: | System: | " echo -e "| Klipper: | System: | "
echo -e "| 1) [Switch Version] | 6) [Change hostname] | " echo -e "| 1) [Switch Version] | 6) [Change hostname] | "
echo -e "| 2) [Rollback] | | " echo -e "| 2) [Rollback] | | "
echo -e "| | Mainsail: | " echo -e "| | Extensions: | "
echo -e "| Firmware: | 7) [Remove branding] | " echo -e "| Firmware: | 7) [Shell Command] | "
echo -e "| 3) [Build only] | | " echo -e "| 3) [Build only] | | "
echo -e "| 4) [Build + Flash MCU] | Extensions: | " echo -e "| 4) [Build + Flash MCU] | | "
echo -e "| 5) [Get Printer-USB] | 8) [Shell Command] | " echo -e "| 5) [Get Printer-USB] | | "
echo -e "| | | " echo -e "| | | "
quit_footer quit_footer
} }
@@ -76,13 +76,13 @@ advanced_menu(){
create_custom_hostname create_custom_hostname
print_msg && clear_msg print_msg && clear_msg
advanced_ui;; advanced_ui;;
#7)
# clear
# print_header
# remove_branding
# print_msg && clear_msg
# advanced_ui;;
7) 7)
clear
print_header
remove_branding
print_msg && clear_msg
advanced_ui;;
8)
clear clear
print_header print_header
install_extension_shell_command install_extension_shell_command