zephyr/scripts/build/dir_is_writeable.py
Anas Nashif 967f9b437b scripts: move dir_is_writeable.py to scripts/build
Move scripts needed by the build system and not designed to be run
individually or standalone into the build subfolder.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-12 10:03:45 +02:00

12 lines
228 B
Python

# SPDX-License-Identifier: Apache-2.0
import os
import sys
def main():
is_writeable = os.access(sys.argv[1], os.W_OK)
return_code = int(not is_writeable)
sys.exit(return_code)
if __name__ == "__main__":
main()