mirror of
https://github.com/dw-0/kiauh.git
synced 2026-04-03 16:25:12 +05:00
Compare commits
3 Commits
31c78a4aaa
...
2b1b2aca74
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b1b2aca74 | ||
|
|
6cd9133a15 | ||
|
|
d190a60ff7 |
1
kiauh.sh
1
kiauh.sh
@@ -81,6 +81,7 @@ function kiauh_update_dialog() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check_if_ratos
|
||||||
check_euid
|
check_euid
|
||||||
init_logfile
|
init_logfile
|
||||||
set_globals
|
set_globals
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ class ShellCommand:
|
|||||||
self.command = shlex.split(cmd)
|
self.command = shlex.split(cmd)
|
||||||
self.timeout = config.getfloat('timeout', 2., above=0.)
|
self.timeout = config.getfloat('timeout', 2., above=0.)
|
||||||
self.verbose = config.getboolean('verbose', True)
|
self.verbose = config.getboolean('verbose', True)
|
||||||
|
self.terminate = config.getboolean('terminate', True)
|
||||||
self.proc_fd = None
|
self.proc_fd = None
|
||||||
self.partial_output = ""
|
self.partial_output = ""
|
||||||
self.gcode.register_mux_command(
|
self.gcode.register_mux_command(
|
||||||
@@ -68,7 +69,7 @@ class ShellCommand:
|
|||||||
if proc.poll() is not None:
|
if proc.poll() is not None:
|
||||||
complete = True
|
complete = True
|
||||||
break
|
break
|
||||||
if not complete:
|
if not complete and self.terminate:
|
||||||
proc.terminate()
|
proc.terminate()
|
||||||
if self.verbose:
|
if self.verbose:
|
||||||
if self.partial_output:
|
if self.partial_output:
|
||||||
|
|||||||
@@ -28,6 +28,21 @@ function check_euid() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function check_if_ratos() {
|
||||||
|
if [[ -n $(which ratos) ]]; then
|
||||||
|
echo -e "${red}"
|
||||||
|
top_border
|
||||||
|
echo -e "| !!! RatOS 2.1 or greater detected !!! |"
|
||||||
|
echo -e "| |"
|
||||||
|
echo -e "| KIAUH does currently not support RatOS. |"
|
||||||
|
echo -e "| If you have any questions, please ask for help on the |"
|
||||||
|
echo -e "| RatRig Community Discord: https://discord.gg/ratrig |"
|
||||||
|
bottom_border
|
||||||
|
echo -e "${white}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
#================================================#
|
#================================================#
|
||||||
#============= MESSAGE FORMATTING ===============#
|
#============= MESSAGE FORMATTING ===============#
|
||||||
#================================================#
|
#================================================#
|
||||||
|
|||||||
Reference in New Issue
Block a user