mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-14 11:04:29 +05:00
Merge pull request #28 from th33xitus/work-ini
fix: #24 - .gitignore for kiauh.ini
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
kiauh.ini
|
||||
@@ -1,6 +0,0 @@
|
||||
#don't edit this file if you don't know what you are doing...
|
||||
backup_before_update=false
|
||||
previous_origin_state=0
|
||||
previous_smoothing_state=0
|
||||
previous_shaping_state=0
|
||||
logupload_accepted=false
|
||||
@@ -256,4 +256,25 @@ create_shell_command_example(){
|
||||
sed -i "$LINE_COUNT $entry" $PRINTER_CFG
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
init_ini(){
|
||||
if [ ! -f $INI_FILE ]; then
|
||||
echo -e "#don't edit this file if you don't know what you are doing...\c" > $INI_FILE
|
||||
fi
|
||||
if [ ! $(grep -E "^backup_before_update=." $INI_FILE) ]; then
|
||||
echo -e "\nbackup_before_update=false\c" >> $INI_FILE
|
||||
fi
|
||||
if [ ! $(grep -E "^previous_origin_state=[[:alnum:]]" $INI_FILE) ]; then
|
||||
echo -e "\nprevious_origin_state=0\c" >> $INI_FILE
|
||||
fi
|
||||
if [ ! $(grep -E "^previous_smoothing_state=[[:alnum:]]" $INI_FILE) ]; then
|
||||
echo -e "\nprevious_smoothing_state=0\c" >> $INI_FILE
|
||||
fi
|
||||
if [ ! $(grep -E "^previous_shaping_state=[[:alnum:]]" $INI_FILE) ]; then
|
||||
echo -e "\nprevious_shaping_state=0\c" >> $INI_FILE
|
||||
fi
|
||||
if [ ! $(grep -E "^logupload_accepted=." $INI_FILE) ]; then
|
||||
echo -e "\nlogupload_accepted=false\c" >> $INI_FILE
|
||||
fi
|
||||
}
|
||||
@@ -32,7 +32,7 @@ update_all(){
|
||||
echo -e "| ${cyan}● Mainsail${default} |"
|
||||
fi
|
||||
if [ "$FLUIDD_UPDATE_AVAIL" = "true" ]; then
|
||||
echo -e "| ${cyan}● Fluidd${default} |"
|
||||
echo -e "| ${cyan}● Fluidd${default} |"
|
||||
fi
|
||||
bottom_border
|
||||
if [ "${#update_arr[@]}" != "0" ]; then
|
||||
|
||||
Reference in New Issue
Block a user