6c3a94c01f
Added a CMake extention for determining if a directory is write-able by the build system. To determine this, we attempt to 'touch' a file in the directory and check the return code of this command. Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
11 lines
190 B
Python
11 lines
190 B
Python
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()
|