Gary Talent 54de52e6c5 Squashed 'deps/nostalgia/' changes from fbebf4ef..646ab128
646ab128 [nostalgia/gfx] Cleanup
74cf0556 [nostalgia] Cleanup
0d8ba1b1 [nostalgia/gfx] Cleanup formatting mistake
20edbb7f [buildcore] Map aarch64 to arm64
6febc7cc [nostalgia] Fix build
b94d6b50 [nostalgia] Remove scene package, finish stubbing out sound
b3952cab [nostalgia] Add build upload step to CI
2ffc11b0 Merge commit 'e723ead864edb4bc160e4d69713309174ad9e82e'
96cace2c [studio] Cleanup
472f5702 [nostalgia/gfx/studio/tilesheet] Change max export scale to 135
c0ac4345 [studio] Cleanup

git-subtree-dir: deps/nostalgia
git-subtree-split: 646ab1283f1f486d301e742459467e7bbfdfc8f5
2025-02-24 21:48:11 -06:00

41 lines
953 B
Python

#
# Copyright 2016 - 2021 gary@drinkingtea.net
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
import os
import platform
import shutil
def mkdir_p(path: str):
if not os.path.exists(path):
os.mkdir(path)
# this exists because Windows is utterly incapable of providing a proper rm -rf
def rm(path: str):
file_exists = os.path.exists(path)
is_link = os.path.islink(path)
is_dir = os.path.isdir(path)
if (file_exists or is_link) and not is_dir:
os.remove(path)
elif os.path.isdir(path):
shutil.rmtree(path)
def get_os() -> str:
return platform.system().lower()
def get_arch() -> str:
arch = platform.machine().lower()
if arch == 'amd64':
arch = 'x86_64'
elif arch == 'aarch64':
arch = 'arm64'
return arch