2024-08-23 10:50:53 +02:00
|
|
|
import strformat
|
|
|
|
import osproc
|
|
|
|
|
2024-08-23 15:08:14 +02:00
|
|
|
import ../model/maintenance_type
|
|
|
|
|
2024-08-23 10:50:53 +02:00
|
|
|
proc run*(cmd: string): int =
|
|
|
|
echo fmt"Trying to run : {cmd}"
|
|
|
|
try:
|
|
|
|
let res = execCmd(cmd)
|
|
|
|
return res
|
|
|
|
except:
|
|
|
|
echo getCurrentExceptionMsg()
|
|
|
|
return 1
|
|
|
|
|
|
|
|
proc runDiscard*(cmd: string): int =
|
|
|
|
echo fmt"Trying to run : {cmd}"
|
|
|
|
try:
|
|
|
|
let res = execCmd(cmd)
|
|
|
|
return res
|
|
|
|
except:
|
|
|
|
echo getCurrentExceptionMsg()
|
|
|
|
return 1
|
2024-08-23 15:08:14 +02:00
|
|
|
|