Files
rise-cook/chmod.py
T
2023-04-29 22:01:04 -04:00

17 lines
412 B
Python

import os
import subprocess
this_dir = os.getcwd()
for root ,b,files in os.walk(os.path.join(this_dir,'dotfiles')):
for element in files:
if '.sh' in element or '.py' in element:
try:
subprocess.run(f"chmod +x {os.path.join(root,element)}", shell=True)
except Exception():
print(Exception())
print(os.path.join(root,element))