Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
2 changes: 0 additions & 2 deletions prepub.sh

This file was deleted.

0 dev-up → scripts/build-dev
100644 → 100755
File renamed without changes.
2 changes: 2 additions & 0 deletions scripts/prepub
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
fd -H -E .git ... -0 | xargs -0 dos2unix
23 changes: 17 additions & 6 deletions sync.py → scripts/watch
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,25 +1,36 @@
#!/usr/bin/env python3

import sys
import time
import logging
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
import subprocess
from threading import Lock

from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler

e_lock = Lock()
events = [0]

def run_build():
subprocess.call(
["julia", "-e", r"""using Pkg; Pkg.develop(path="."); Pkg.rm("DIO"); Pkg.develop(path="."); using DIO; @info :ok"""])
[
"julia",
"-e",
r"""using Pkg; Pkg.develop(path="."); Pkg.rm("DIO"); Pkg.develop(path="."); using DIO; @info :ok""",
]
)


class MyH(FileSystemEventHandler):
def on_any_event(self, event):
with e_lock:
events[0] += 1
print("modified")



if __name__ == "__main__":
path = sys.argv[1] if len(sys.argv) > 1 else '.'
path = sys.argv[1] if len(sys.argv) > 1 else "."
observer = Observer()
observer.schedule(MyH(), path, recursive=True)
observer.start()
Expand All @@ -32,4 +43,4 @@ def on_any_event(self, event):
events[0] = 0
except KeyboardInterrupt:
observer.stop()
observer.join()
observer.join()