1
Fork 0
mirror of https://github.com/RGBCube/CSAssignments synced 2025-07-25 04:57:43 +00:00
This commit is contained in:
RGBCube 2022-11-05 16:19:31 +03:00
parent df3ebcd560
commit 57f4be66d2
20 changed files with 322 additions and 1681 deletions

View file

@ -0,0 +1,10 @@
__all__ = ("ROOT", "IS_WINDOWS", "QUIET_SUFFIX", "CHECK_COMMAND_EXISTS", "OS_KEY")
from os import name as os_name
from pathlib import Path
ROOT = Path(__file__).parent.parent
IS_WINDOWS = os_name == "nt"
QUIET_SUFFIX = " | Out-Null" if IS_WINDOWS else " > /dev/null"
CHECK_COMMAND_EXISTS = ("Get-Command {}" if IS_WINDOWS else "command -v {}") + QUIET_SUFFIX
OS_KEY = "windows" if IS_WINDOWS else "unix"