accidentaly uploaded wrong content

This commit is contained in:
jenz 2024-09-13 15:16:44 +02:00
parent 1337172b91
commit 5c9de31835

View File

@ -1,16 +1,15 @@
#!/bin/bash #!/usr/bin/python3
to_lowercase() { from pathlib import Path
find "$1" -depth -execdir rename 's/(.*)/\L$1/' {} +
./lowercase_res_content.py
}
to_lowercase "./svencoop_addon" #we just lowercase each line in each res file so fastdl is fine with everything being lowercase.
def main():
inotifywait -m -r -e create -e moved_to -e modify --format '%w%f' "./svencoop_addon" | while read NEWFILE for p in Path("./svencoop_addon/maps/").glob('*.res'): #get all .res files in /maps
do with open(p, 'r') as res:
echo "File change: $NEWFILE" lines = res.readlines()
to_lowercase "./svencoop_addon" with open(p, 'w') as res:
sleep 1 for line in lines:
done res.write(line.lower())
if __name__ == "__main__":
main()